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

絶対パスを試しましたか?すなわち

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

それはマニュアルに従って動作するはずです(そしてそれは私にとってはそうです)

于 2013-06-12T11:55:40.560 に答える