Warning: chdir() [function.chdir]: No error (errno 0) in E:\PHPnow\htdocs\web\html\inc\zip.php on line 13Warning: Cannot modify header information - headers already sent by (output started at E:\PHPnow\htdocs\web\html\inc\zip.php:13) in E:\PHPnow\htdocs\web\html\inc\zip.php on line 15Warning: Cannot modify header information - headers already sent by (output started at E:\PHPnow\htdocs\web\html\inc\zip.php:13) in E:\PHPnow\htdocs\web\html\inc\zip.php on line 16Warning: Cannot modify header information - headers already sent by (output started at E:\PHPnow\htdocs\web\html\inc\zip.php:13) in E:\PHPnow\htdocs\web\html\inc\zip.php on line 17Warning: Cannot modify header information - headers already sent by (output started at E:\PHPnow\htdocs\web\html\inc\zip.php:13) in E:\PHPnow\htdocs\web\html\inc\zip.php on line 18Warning: Cannot modify header information - headers already sent by (output started at E:\PHPnow\htdocs\web\html\inc\zip.php:13) in E:\PHPnow\htdocs\web\html\inc\zip.php on line 19PK
1 回答

BIG陽
TA貢獻1859條經驗 獲得超6個贊
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 |
- 1 回答
- 0 關注
- 147 瀏覽
添加回答
舉報
0/150
提交
取消