Warning: Cannot modify header information - headers already sent by ......
wordpress升级完一个主题后,出现了错误提示。
Warning: Cannot modify header information - headers already sent by (output started at /data1/www/htdocs/363/ihaotao/1/wp-content/themes/mitao/includes/creekoo_options.php:1) in wp-includes/option.php on line 563 Warning: Cannot modify header information - headers already sent by (output started at /data1/www/htdocs/363/ihaotao/1/wp-content/themes/mitao/includes/creekoo_options.php:1) in wp-includes/option.php on line 564
出这个错误是因为 header(‘Content-Type:text/html;charset= UTF-8‘);发送头之前不能有任何输出,空格也不行,需要将header(…)之前的空格去掉,或者其他输出的东西去掉,如果他上面include其他文件了,还要检查其他文件里是否有输出.
即根据路径把wp-content/themes/mitao/includes/creekoo_options.php文件第一行前的输出或空格去掉即可。
Warning: Cannot modify header information - headers already sent by ......
https://ldsun.com/2013/12/22/Warning-Cannot-modify-header-information-headers-already-sent-by/