gpt4 book ai didi

php - 在 Hero Framework 主题中的 .thtml 文件中执行 php

转载 作者:行者123 更新时间:2023-11-28 03:41:16 25 4
gpt4 key购买 nike

有没有办法在 Hero Framework 的 html 文件中执行 php?

只需放置一个

<?php echo 'hello world';?>

在 thtml 文件中不起作用。

有办法吗?

谢谢

最佳答案

我很好奇,用谷歌搜索了一下:

显然,Hero Framework 使用 smarty 作为模板引擎,这……很有趣……(附:smarty 现在看起来相当复杂,我知道它在缓存处理方面做得很好,甚至几年前。另一方面,它是应用程序中的另一层,是另一种需要学习的方言,是必须由 PHP 解释的代码)

smarty 强烈反对在模板中直接使用纯 php,您可以在这里阅读更多内容:

smarty documentation

关于php - 在 Hero Framework 主题中的 .thtml 文件中执行 php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10834747/

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