每当我打开网页我收到以下错误:PHP头(位置)错误
[04月2012年17点10分45秒] PHP的警告:不能更改头信息 - 头已经发出(输出开始于/home/test/public_html/admin/header.php:39) /home/test/public_html/admin/edAgent.php on line 80
[04-Jul-2012 17:10: 55] PHP警告:无法修改标头信息 - 已在 /home/test/public_html/admin/edAg中输出的标头(在/home/test/public_html/admin/header.php:39开始输出) ent.php线80条上
件的代码,包括标头:
Encoding头:
header('Content-Type: text/html; charset=utf-8');
登录重定向头:
if(!isset($_SESSION["login"])OR $_SESSION["login"]!=1){
header('Location: login.php');
exit;
}
检查是否记录使用r的权限编辑:
if($level!='4') {
header('Location: acd.php?msg=1');
exit;
}
检查,如果ID存在:
if ($nUsers==0) {
header('Location: acd.php?msg=2');
exit;
}
检查,如果信息是可编辑:
if($access != '4') {
header('Location: acd.php?msg=1');
exit;
}
看看/home/test/public_html/admin/header.php的39线 - 错误信息给你一个真正的大线索有 – 2012-07-05 09:58:56
为什么你使用退出? – Gntem 2012-07-05 09:59:05
39号线上有什么代码? – 2012-07-05 09:59:20