调试Magento
有什么想法吗?
2011-10-20T11:30:47+00:00 调试 (7): 标头已发送:
[0] /chroot/home/.../html/app/code/core/Mage /核心/控制器/响应/Http.php:44
[1] /chroot/home/..../html/lib/Zend/Controller/Response/Abstract.php:766
[2] /chroot/home/..../html/app/code/core/Mage/Core/Controller/Response/Http.php:75
[3] /chroot/home/.../html/app/code/core/Mage/Core/Controller/Varien/Front.php:188
[4] /chroot/home/.../html/app/code/core/Mage/Core/Model/App.php:340
[5] /chroot/home/.../html/app/Mage.php:627
[6] /chroot/home/.../html/index.php:80
感谢您的宝贵时间!
Any ideas what this means?
2011-10-20T11:30:47+00:00 DEBUG (7): HEADERS ALREADY SENT: <pre>[0] /chroot/home/.../html/app/code/core/Mage/Core/Controller/Response/Http.php:44
[1] /chroot/home/..../html/lib/Zend/Controller/Response/Abstract.php:766
[2] /chroot/home/..../html/app/code/core/Mage/Core/Controller/Response/Http.php:75
[3] /chroot/home/.../html/app/code/core/Mage/Core/Controller/Varien/Front.php:188
[4] /chroot/home/.../html/app/code/core/Mage/Core/Model/App.php:340
[5] /chroot/home/.../html/app/Mage.php:627
[6] /chroot/home/.../html/index.php:80
thanks for your time!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这意味着您在创建系统响应对象的自动输出之前在 Magento 中生成输出。
Magento 使用响应对象来控制所有发送的输出。一旦控制器被调度,Magento 就会告诉响应对象发送其标头,然后发送其输出。这意味着,如果您在不属于布局系统的任何地方生成输出,当响应对象开始发送其标头时,它将检测到输出已发送到浏览器,并会喷出上述内容向日志发出警告。
It means you're producing output in Magento prior to the system's response object's automatic output being created.
Magento uses a response object to control all output sent. Once a controller's been dispatched, Magento tells the response object to send its headers, and then send its output. This means if you produce output anywhere that's not a part of the layout system, when the response object gets to sending it's headers it will detect that output has already been sent to the browser, and will spew the above warning to the logs.
如果您找不到任何解决方案,只需将
ob_start()
放在文件顶部,它会删除所有标头并启动新标头,这肯定会解决您的问题If you can't find any solutions for this just put
ob_start()
in your top of the file it removes all headrs and start new header this will surely solve your problem