如何指定Zend Framework使用与操作默认文件不同的视图文件?

Ste*_*ler 3 php model-view-controller zend-framework

我有一个动作,successAction(),它使用我的views文件夹中的文件success.phtml,如何告诉我希望它使用success2.phtml文件的动作

typ*_*ror 9

Zend_Controller_Actionrender.这将在controller-name/success2.phtml中呈现视图脚本

class ControllerName_Controller_Action extends Zend_Controller_Action
{
    public function successAction()
    {
        $this->render("success2");
    }
}
Run Code Online (Sandbox Code Playgroud)

您应该阅读Zend Controller的文档了解更多信息.