php有些系统会报错或提示 Cannot modify header information - headers already sent by

1
Warning: Cannot modify header information - headers already sent by (output started at /home/test/domains/test.nl/public_html/wp-content/themes/mugen/engine/theme-scripts.php:1) in /home/test/domains/test.nl/public_html/wp-content/plugins/woocommerce/classes/class-wc-session-handler.php on line 63

  

出现这样的情况的原因很多,比如:

1、<?php 或 ?> 前面有空白符

2、<?php 前面有html代码

3、文件不是无BOM的UTF8编码

 

 

stackoverflow上的文章:

http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php/8028987#8028987

http://stackoverflow.com/questions/19925262/warning-cannot-modify-header-information-headers-already-sent-by-php-error?answertab=active#tab-top

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。