【发布时间】:2016-05-27 14:01:38
【问题描述】:
当我使用包含文件包含文件时,我们的项目从 smarty 2 翻转到 smarty 3。 它返回
错误:无法加载模板。
它在 smarty 2 中工作正常,但在翻转后它在 smarty 3 中不工作有什么建议吗? 提前致谢
【问题讨论】:
标签: php templates include smarty3 smarty2
当我使用包含文件包含文件时,我们的项目从 smarty 2 翻转到 smarty 3。 它返回
错误:无法加载模板。
它在 smarty 2 中工作正常,但在翻转后它在 smarty 3 中不工作有什么建议吗? 提前致谢
【问题讨论】:
标签: php templates include smarty3 smarty2
在实例化 Smarty 后尝试“testInstall”方法并设置目录,在本例中为“$smarty”:
[...]
$smarty->setTemplateDir('somedir/templates/');
$smarty->setCompileDir('somedir/templates_c/');
$smarty->setConfigDir('somedir/configs/');
$smarty->setCacheDir('somedir/cache/');
$smarty->testInstall();
exit;
【讨论】: