Warning 在PHP裏屬於比較輕的錯誤提示,通常不會嚴重影響程序的正常運行。
Warning: chdir() 這個警告提示No error,那麽可能是對於chdir() 這個函數,服務器端權限安全設置導致的。
Warning: Cannot modify header information
這種警告在PHP裏比較常見,原因也有多樣,解決辦法:
1. 檢查有<?php ... ?> 前面沒有空白行,特別是include或者require的文件。不少問題是這些空白行導致的。
2. 在header後加上exit();?
header?("Location:?xxx");exit();
3. 用Javascrīpt來解決:
<?echo?"<scrīpt>?self.location(?file.php?);</scrīpt>";?>4. 用輸出緩存來解決:
<?php?ob_start();?>...?HTML?codes?...
<?php
...?PHP?codes?...
header?("Location:?....");
ob_end_flush();
>5.?開啟php.ini中的
output_buffering?=?On