我正在開發w網站。在這裏我已經包括一個thumnail頁面。它在我的本地主機上運行良好。但是,當我上傳它給我一個錯誤看到避免輸出緩衝錯誤serevr
Warning: Cannot modify header information - headers already sent by (output started at /mydomain/demo1/admin/thumbnail.php:50) in /mydomain/demo1/admin/act-addVehicle.php on line 191
我的代碼
if(move_uploaded_file ($tmpName,$path.$actual_image_name)){
$succ=1;
chmod("$add",0777);
$imgSucc=1;
//strt image thumbnail
include("./thumbnail.php");
// ends
}else{ echo "Failed to upload file Contact Site admin to fix the problem";
exit;}
我如何避免這個錯誤 有沒有在PHP INI任何設置?
有誰知道嗎? 請回復
您在嘗試更改標題之前已發送內容。 – 2012-04-28 07:41:24
請發佈與問題相關的代碼。你可以通過編輯你自己的問題並在問題的主體中添加它。它會幫助我們幫助你。的 – 2012-04-28 07:41:35
可能重複[頭已經通過PHP發送(http://stackoverflow.com/questions/8028957/headers-already-sent-by-php),你需要的一切知道這裏:http://stackoverflow.com/ a/8028987/398242首先,我沒有看到你在任何地方使用輸出緩衝;你沒有真正提供足夠的信息來幫助你的案例。 – 2012-04-28 08:03:50