每當我打開網頁我收到以下錯誤: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