douhao6557 2013-09-20 13:11
浏览 36
已采纳

将操作中的变量传递给ZF中的另一个操作视图

I want to know that does zend allow this thing and if yes than how?

public xAction()
{
// code here
}

public yAction(){
 $this->_helper->viewRenderer('x');
// code here....
// $this->view->variable= $somedata;
}

**x.phtml**

<?php echo $this->variable; ?>
  • 写回答

1条回答 默认 最新

  • dqusbxh44823 2013-09-20 13:25
    关注

    Zend allows the rendering of a different view script. You can do it like this: $this->_helper->viewRenderer('controller/action', null, true);
    More info here (Example #11)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?