0
我也一直在做同樣的與以前版本的Smarty ...喜歡加載指定的模板文件夾以外的TPL文件,如:Smarty的3來自外部的模板文件夾模板
$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
謝謝!它的工作原理...我怎麼可能先沒有猜到它?需要休息lol – Whocares
不客氣;) – strikernl
你也可以爲模板定義多個路徑http://www.smarty.net/docs/en/api.add.template.dir.tpl – YomY