Php Zend Framework布局的文件扩展名

Php Zend Framework布局的文件扩展名,php,model-view-controller,zend-framework,Php,Model View Controller,Zend Framework,在Zend框架中,我们可以通过向控制器添加以下代码,将视图文件的文件扩展名从phtml更改为php $this->getHelper('viewRenderer')->setViewSuffix('php'); 但是如何更改布局文件的文件扩展名?未测试,但可能通过 -设置布局视图脚本后缀和 试一试 你也可以试试 Zend_Layout::getMvcInstance()->setViewSuffix('php'); 还有,因此当使用Zend_应用程序时,您可能也可以从

在Zend框架中,我们可以通过向控制器添加以下代码,将视图文件的文件扩展名从phtml更改为php

$this->getHelper('viewRenderer')->setViewSuffix('php');

但是如何更改布局文件的文件扩展名?

未测试,但可能通过

  • -设置布局视图脚本后缀和
试一试

你也可以试试

Zend_Layout::getMvcInstance()->setViewSuffix('php');
还有,因此当使用
Zend_应用程序
时,您可能也可以从application.ini设置
viewSuffix
,例如

resources.layout.viewSuffix = php;
谢谢,$this->getHelper('layout')->setViewSuffix('php');这对我有用。
resources.layout.viewSuffix = php;