gpt4 book ai didi

zend-framework - 在 Zend Framework 中更改布局扩展

转载 作者:行者123 更新时间:2023-12-04 06:28:55 26 4
gpt4 key购买 nike

我们可以在 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com