Warning: Cannot modify header information 怎么回事?

2016-07-07 15:14 来源:www.chinab4c.com 作者:ecshop专家

这个是突然出现的,是怎么回事呢?

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\cls_session.php on line 116

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\init.php on line 149

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\init.php on line 150

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\cls_template.php on line 51

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\lib_main.php on line 941

回答:
貌似是BOM问题,建议使用专业的代码编辑软件进行修改,
修改完后,保存的时候,要保存为 无BOM 格式的


是怎么回事呢,以前没有这个现象的,现在有这个问题了啊。BOM是什么东西呢?

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\cls_session.php on line 116

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\init.php on line 149

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\init.php on line 150

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\cls_template.php on line 51

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\lib_main.php on line 941

在C:windows下找到php.ini文件
把output_buffering默认的Off设为4096就OK了,这个值可以设置成On,但这里设置成数值,能解决问题.

不过因为我这边是租用别人的程序,不知道怎么来解决呢,是不是可以导入到另外的空间服务商那边,真是头痛的问题啊。这里有没有好的空间服务商呢?


好神奇的路径~~~没见过

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\cls_session.php on line 116

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\init.php on line 149

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\init.php on line 150

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\cls_template.php on line 51

Warning: Cannot modify header information - headers already sent by (output started at D:\clientweb\bendigoun\wwwroot\index.php:2) in D:\clientweb\bendigoun\wwwroot\includes\lib_main.php on line 941 一直都是碰到这样的问题,我都是自己想来租用服务器来解决这个问题。

这种问题问的人很多了!
你用的肯定是utf-8版本,而且修改过文件!

记得不能用记事本什么修改(记事本修改过会自动加上BOM),修改过的文件确保要把 utf-8 BOM 去掉!!!
不然在文件开头就会有输出,造成这种情况。
找个文本编辑器,比如 editplus 大开文件,另存为 utf-8就可以了。注意不要选择utf-8 + BOM

Fatal error: Maximum execution time of 30 seconds exceeded in D:\clientweb\bendigoun\wwwroot\includes\lib_order.php on line 16

Fatal error: Maximum execution time of 30 seconds exceeded in D:\clientweb\bendigoun\wwwroot\includes\cls_session.php on line 211谢谢你了啊,一般出现这个问题是怎么回事呢? 那个也是突然出现那个问题的,如果我要改回来,应该i如何来改好呢?可以指点一下吗?





Warning: Cannot modify header information - headers already sent by
这种问题,是说在代码输出header之前,已有header输出了, 按我8楼说的修改

Fatal error: Maximum execution time of 30 seconds exceeded in
这个提示是说程序执行时间超过30秒,这个时间是php配置的,也可以程序中修改
不过出现这个错误一般是服务器配置、性能问题。程序不用修改。

Fatal error: Maximum execution time of 30 seconds exceeded in
这个提示是说程序执行时间超过30秒,这个时间是php配置的,也可以程序中修改
不过出现这个错误一般是服务器配置、性能问题。程序不用修改。 //这个的服务器
配置 性能,一般要怎么样来做呢? 可以来大致告诉一下吗?