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 关注
- 171 浏览
添加回答
举报
0/150
提交
取消