Zend framework 更改Zend框架中的布局扩展
我们可以在ZF中将布局文件的扩展名从phtml更改为php吗Zend framework 更改Zend框架中的布局扩展,zend-framework,layout,Zend Framework,Layout,我们可以在ZF中将布局文件的扩展名从phtml更改为php吗 如何操作?一种方法是在应用程序.ini中添加以下行: resources.layout.viewSuffix = "php" 另一种方法是在bootstrap.php中指定新的扩展名,例如: public function _initLayoutExtension() { $layout = $this->bootstrap('layout')->getResource('layout'); $layou
如何操作?一种方法是在
应用程序.ini中添加以下行:
resources.layout.viewSuffix = "php"
另一种方法是在bootstrap.php
中指定新的扩展名,例如:
public function _initLayoutExtension() {
$layout = $this->bootstrap('layout')->getResource('layout');
$layout->setViewSuffix('php');
}