博客停了,Wordpress后台登陆报错,wp-login.php登陆页面出错,出现“Warning: Cannot modify header information – headers already sent by ……”这样的错误,
Warning: Cannot modify header information – headers already sent by (output started at G:\Program Files\AppServ2\www\Yeah20110213\wp-content\themes\monochrome \functions.php:216) in G:\Program Files\AppServ2\www\Yeah20110213\wp-login.php on line 335
Warning: Cannot modify header information – headers already sent by (output started at G:\Program Files\AppServ2\www\Yeah20110213\wp-content\themes\monochrome \functions.php:216) in G:\Program Files\AppServ2\www\Yeah20110213\wp-login.php on line 347
Warning: Cannot modify header information – headers already sent by (output started at G:\Program Files\AppServ2\www\Yeah20110213\wp-content\themes\monochrome \functions.php:216) in G:\Program Files\AppServ2\www\Yeah20110213\wp-login.php on line 349
虽然以前也出现过,但是过一段时间可以登陆成功,影响不大,主要是虚拟主机的问题,等服务器那边好了就好了。这次完全无法登陆后来了,查了一下午, 网上有好多网友遇到类似的、一样的问题,答案、方法几乎都千篇一律,说修改php.ini文件或者说是代码编码问题,什么如果使用UTF-8格式的,要保 存问无BOM的UTF-8格式。
这些都试过还是无用,最后在查看所用模板文件夹中的functions.php文件时发现了问题所在:
上图是functions.php文件的结束行,最后一个php标识符“?>”后有两空白行215、216,问题就是它们所致。删除即可!
如果还是出现“Warning: Cannot modify header information – headers already sent by”这样的提示,不要紧,它提示的错误个数是不是和刚才不同了,你再仔细找找functions.php文件的开头处“。
看吧,讨厌的“Warning: Cannot modify header information ……”没有了吧
原文:耶网博客http://www.yeah2.com/?p=919