russia5 Posted October 1, 2016 Share Posted October 1, 2016 I am setting up Smarty for the first time. (I have the parent site www.xyz.com and within that site's folders, I have a daughter site www.atc-roofing.com The folder list is: public_html/atc-roofing/ public_html/xyz folders and index.php Under the folder public_html/ atc-roofing/ reside the folling folders: smarty/libs/(smarty folders and files atc-roofing/cashe/ atc-roofing/templates/ atc-roofing/templates_c/ acc-roofing/config/ The public_html/atc-roofing/ index.php file reads: <?PHP // put full path to Smarty.class.php require_once ('smarty/libs/Smarty.class.php')> $smarty = new Smarty; $smarty->caching = true; $smarty->cache_lifetime = 120; $smarty->template_dir = './templates'; $smarty->compile_dir = './templates_c'; $smarty->assign('name', 'Ned'); $smarty->display('index.tpl'); ?> The error I am getting is: Fatal error: Class 'Smarty' not found in /home1/nuclearp/public_html/atc-roofing.com/index.php on line 6 Can anyone see what I am doing wrong with my path to the Smarty.Class.php Quote Link to comment https://forums.phpfreaks.com/topic/302269-smarty-template-configuration/ Share on other sites More sharing options...
Jacques1 Posted October 1, 2016 Share Posted October 1, 2016 Fix your syntax. require_once ('smarty/libs/Smarty.class.php')> ^^^^ Quote Link to comment https://forums.phpfreaks.com/topic/302269-smarty-template-configuration/#findComment-1537951 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.