关于ecshop报错headers already sent by是何故

2016-09-11 20:39 来源:www.chinab4c.com 作者:ecshop专家

 有时候网站搬家,或者修改一些忘记,忘记原来的程式修改内容,可能会报错,比如几天的报错:

 

arning: Cannot modify header information - headers already sent by (output started at /home/content/03/10131903/html/ecshop.co/index.php:1) in /home/content/03/10131903/html/eshop/includes/cls_session.php on line 116

Warning: Cannot modify header information - headers already sent by (output started at /home/content/03/10131903/html/ecshop.co/index.php:1) in /home/content/03/10131903/html/eshop/includes/init.php on line 165

Warning: Cannot modify header information - headers already sent by (output started at /home/content/03/10131903/html/ecshop.co/index.php:1) in /home/content/03/10131903/html/eshop/includes/init.php on line 166

Warning: Cannot modify header information - headers already sent by (output started at /home/content/03/10131903/html/ecshop.co/index.php:1) in /home/content/03/10131903/html/eshop/includes/cls_template.php on line 58
这个报错语句在includes/cls_session.php  与 init.php    cls_template.php  三个文件
headers already sent by  意思本身就是头超出的意思。在ECSHOP当中出问题原因很简单:
这三个文件的编码没去UTF8  的BOM, 一般是使用记事本修改才会出现此问题, 拿专业编辑器比如DW、EditPlus 重新编辑另存为下就OK 了
详细原因是记事本是不去bom的。以前的机器是屏蔽报错的,使用也正常,搬家后环境变动报错就出现了。  解决了吗? 解决了,在底部评论留言!