Zend Framework 1.12如果我写$ this-> _forward($ action,$ controller,$ module);在行动中,页脚部分将不会执行

时间:2014-02-24 08:18:21

标签: php zend-framework

Zend Framework 1.12如果我写$ this-> _forward($ action,$ controller,$ module);在行动中,当成功执行标题代码时,页脚部分将不会执行。 没有错误和页脚部分执行代码的解决方案也将按预期显示。

1 个答案:

答案 0 :(得分:0)

_forward()做什么:

_forward($action, $controller = null, $module = null, array $params = null) 

执行其他操作。如果在preDispatch()中调用,则将跳过当前请求的操作以支持新操作。否则,在处理当前操作之后,将执行_forward()中请求的操作。 (http://framework.zend.com/manual/1.12/en/zend.controller.action.html

也许这会明确概念以及如何使用它。

通常,如果您有模板系统,则可能会呈现页眉和页脚。