Java堂  


两个PHP的Warning及解决方法

归档在: DynamicLanguage — Jet @ 5:56 下午
Tags:
原文出处: http://www.javatang.com/archives/2007/11/11/5611239.html
作者: Jet Mah from Java堂
声明: 可以非商业性任意转载, 转载时请务必以超链接形式标明文章原始出处、作者信息及此声明!

1. Cannot modify header information

PHP Warning: Cannot modify header information - headers already sent by (output started at yourfiles)

这是因为设置的头文件信息溢出造成的。解决方法:将output_buffering 设为 on 就可以了

2. output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression’

PHP Warning: ob_start() [ref.outcontrol]: output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression’ in yourfiles

这是因为PHP中Zlib模块设置错误造成的,将zlib.output_compression这一行注释掉就可以了。这里需要指出的是PHP5自带GZIP模块的,不需要另外加载。

参考资料:
解决Warning: Cannot modify header information - headers already sent by ……
启用页面 Gzip 压缩后发生错误,请指点

没有评论 »

还没有评论。

发表您的评论