我的 WordPress 自定义插件意外更改标头信息并给出错误
我为 WordPress 开发自定义插件。
但我不明白为什么它在我的实时服务器中给我标头错误。
但不在我的 WAMPP 服务器中。
这是消息错误
警告:无法修改标头信息 - 标头已发送(输出从 /home/villapor/public_html/wp-content/plugins/villa-management/includes/inc.villaportal.php:596 开始)在 /home/villapor/public_html/wp-includes/pluggable.php 第 897 行
这是索引插件文件,我把它放在 ideone.com 中,因为代码太长
http://ideone.com/4TS4B
这是 inc.villaportal.php 如上面错误消息中所述
http://ideone.com/FJR4K
如果您需要查看其他文件内容以帮助我解决问题,请通知我这个:)
提前谢谢你,
古斯德
I develop custom plugin for wordpress.
but i didn't understand why it is give me header error in my live server.
but not in my WAMPP Server.
here is the message error
Warning: Cannot modify header information - headers already sent by (output started at /home/villapor/public_html/wp-content/plugins/villa-management/includes/inc.villaportal.php:596) in /home/villapor/public_html/wp-includes/pluggable.php on line 897
Here is the index plugin file, i put it in ideone.com because the code is to long
http://ideone.com/4TS4B
and this is the content of inc.villaportal.php
as mentioned in the error message above
http://ideone.com/FJR4K
please inform me if you need another content of file to view to help me resolve this :)
thank you in advance,
GusDe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
抱歉,这可能看起来有点有趣,但我在阅读 WordPress 文档后找到了解决方案
http://codex.wordpress.org/FAQ_Troubleshooting
在
如何解决标头已发送警告问题?
部分,我的文件
inc.villaportal.php
有额外的空间。位于我的文件末尾的空格?>
感谢您的宝贵时间
sorry this maybe look bit funny, but i found the solution after read at wordpress doc
http://codex.wordpress.org/FAQ_Troubleshooting
at section
How do I solve the Headers already sent warning problem?
there is extra space at the of my file
inc.villaportal.php
. the space located at the end of my file?>
Thank you for your time