Question

I have had been doing same with previous smarty versions... Like loading a TPL file outside of specified templates folder, like this:

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

however since upgrade, I receive following errors:

[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 
Was it helpful?

Solution

Have you tried an absolute path? i.e.

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

That should work according to the manual (and it does for me)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top