2012-10-23 35 views
-3

可能重复:
Headers already sent by PHP腓不能修改标题信息

我知道这是一个非常普遍的问题,我有很多用Google搜索这一点,但仍然没有成功。我收到此错误

Warning: Cannot modify header information - headers already sent by (output started at G:\xampp\htdocs\bidding_site\inc\header.php:88) in G:\xampp\htdocs\bidding_site\inc\add_project.php on line 8 

我已经检查了存在header()之前没有空格。下面是我的add_project.php

<?php 

if(isset($_SESSION['user'])) { 
echo "hello world"; 
} 
else { 

header('location:../index.php'); 
} 
?> 
+1

此外,问题是在'header.php'的#88行上 – Phil

回答

0

错误消息已经解释发生了什么事的代码; inc\header.php在第88行发送了一些输出(例如回显,打印或PHP标签外的东西)。

这就是说,这是一个非常普遍的问题,这里还有其他答案,因此Google和Google会显示大量答案,所以这应该关闭。