我们可以在 ZF 中将布局文件的扩展名从 phtml 更改为 php 吗?
如何?
最佳答案
一种方法是将以下行添加到您的 application.ini
中:
resources.layout.viewSuffix = "php"
另一种方法是在 bootstrap.php
中指定新扩展,例如:
public function _initLayoutExtension() {
$layout = $this->bootstrap('layout')->getResource('layout');
$layout->setViewSuffix('php');
}
关于zend-framework - 更改 Zend Framework 中的布局扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5684766/