Trying to use Smarty properly, I created a config file. The file structure is like this:
/Smarty/
/Smarty/cache
/Smarty/configs
/Smarty/configs/main.conf
/Smarty/plugins
/Smarty/sysplugins
/Smarty/templates_c
/templates/
/templates/main.tpl
index.php
In main.tpl I try to load the main.conf from /Smarty/configs/main.conf by:
{config_load "main.conf"} as explained here: http://www.smarty.net/docs/en/language.config.variables.tpl
This doesn't work ("Fatal error: Uncaught exception 'SmartyException' with message 'Unable to read config file 'main.conf'' in..."), however this does work:
{config_load "/var/www/vhosts/*domain*/subdomains/cms/httpdocs/Smarty/configs/main.conf"}
Why doesn't the first example work? I did set the config dir earlier by:
$smarty->setConfigDir(SMARTY_DIR.'configs/');
But the config dir isn't found. Could someone please help me? Thanks in advance!
$smarty->getConfigDir()after you callsetConfigDirto see what path is actually there. - Eugene