This error is written to the logs:

Fatal error: Uncaught exception 'SmartyException' with message 'Unable to load template file 'aboutcity.tpl' 

Smarty is connected in this way:

 define('SMARTY_TPL','/style/'.$setup['skin'].'/'); require_once('smarty/libs/Smarty.class.php'); $smarty = new Smarty(); $smarty->caching = true; $smarty->template_dir = SMARTY_TPL.'templates/'; $smarty->compile_dir = SMARTY_TPL.'templates_c/'; $smarty->config_dir = SMARTY_TPL.'configs/'; $smarty->cache_dir = SMARTY_TPL.'cache/'; 

$setup['skin'] is equal to default , taken from the database.

In the code of the file where the template should be displayed, I am writing $smarty->display('aboutcity.tpl'); and a white page is displayed (it is also cropped). If I remove the code $smarty->display('aboutcity.tpl'); , the pattern is not displayed accordingly, but the page is not cropped. Folder rights - 0777. Something I do not understand what the problem is. Smarty just started to use.

    1 answer 1

     define('SMARTY_TPL', $_SERVER['DOCUMENT_ROOT'].'/style/'.$setup['skin'].'/'); 

    Or that you have there for the path to the folder with the site is responsible. And check that the variables before asking) Plus, there is a function file_exists , for example, if in doubt.

    • Yes, I already solved the problem. Really this $ _SERVER ['DOCUMENT_ROOT']. ' not enough. - vitagame