脚本宝典收集整理的这篇文章主要介绍了php – Zend_Session:必须在将任何输出发送到浏览器之前启动会话,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
Fatal error: Uncaught exception 'Zend_Session_Exception' wITh message 'Session must be started before any output has been sent to the browser ...
这是我的整个控制器.它显示“成功”,但它也显示错误消息.如何使该错误消息静音,以便我可以简单地向浏览器回应一些内容?
<?PHP class CacheController extends Zend_Controller_Action { public function clearAction() { $this->_helPEr->layout->disableLayout(); $this->_helper->vieWrenderer->setNoRender(); try { $result = Model_Cache::emptyCache(array('foobar'=>1)); if ($result['status'] == true) { echo 'Success'; } else { echo 'Error: ' . $result['message']; } } catch (Exception $e) { echo 'Error: ' . $e->getMessage(); } } }
以上是脚本宝典为你收集整理的php – Zend_Session:必须在将任何输出发送到浏览器之前启动会话全部内容,希望文章能够帮你解决php – Zend_Session:必须在将任何输出发送到浏览器之前启动会话所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。