【发布时间】:2014-07-25 17:53:22
【问题描述】:
我完全不知道 smarty 模板系统。我想要做的是包含一个 php 文件以在 .tpl 文件中获取一些变量(这是一个 WHMCS 模板)。
我试过这样:
{php} include ('file.php'); {/php} //doesn't work
{include_php file='file.php'} //doesn't work
我也关注了this question的回答。仍然无法正常工作。
如何在 WHMCS 的 header.tpl 中包含 code.php?有什么帮助吗?
仅供参考:tpl 和 php 文件都在同一个目录中,如果有帮助的话。
【问题讨论】: