0

我对以前的 smarty 版本一直在做同样的事情......就像在指定的模板文件夹之外加载一个 TPL 文件,像这样:

$smarty->display("../admin/bin/tpl/default.tpl");
exit();

但是自升级以来,我收到以下错误:

[12-Jun-2013 11:40:12 UTC] PHP Fatal error:  Uncaught exception 'SmartyException' with message 'Unable to load template file '../admin/bin/header.tpl' in '../admin/bin/tpl/default.tpl'' in 
4

1 回答 1

3

你试过绝对路径吗?IE

$smarty->display("/var/www/mywebsite.com/templates/admin/bin/tpl/default.tpl");

这应该根据手册工作(它对我有用)

于 2013-06-12T11:55:40.560 回答