我期待着
类 Default_Plugin_Test 扩展 Zend_Controller_Plugin_Abstract
{
公共函数 preDispatch($request)
{
Zend_Controller_Front::getInstance()->setParam('disableOutputBuffering', true);
}
}
还会禁用与操作关联的视图中的缓冲,但它不会。
甚至似乎不可能禁用视图中的输出缓冲,因为它是硬编码的:
抽象类 Zend_View_Abstract 实现 Zend_View_Interface
{
/**
* 处理视图脚本并返回输出。
*
* @param string $name 要处理的脚本名称。
* @return string 脚本输出。
*/
公共函数渲染($名称)
{
// 使用父私有方法查找脚本文件名
$this->_file = $this->_script($name);
未设置($名称);// 从本地范围中删除 $name
ob_start();
$this->_run($this->_file);
返回 $this->_filter(ob_get_clean()); //过滤输出
}
}
有没有人有类似的经历,或者有解决方案?