Im trying to use smarty but im having trouble with it.
if anyone can help me out.
i uploaded the smarty folder downloaded on smarty.php.net in the root level.
in my php file i set following path: require('/home/MY_USER_NAME/smarty/libs/Smarty.class.php');
then i have the following code:
$smarty = new Smarty();
$filepath = MY_USER_NAME;
$smarty->template_dir = '/home/' . $filepath . '/public_html/templates';
$smarty->compile_dir = '/home/' . $filepath . '/public_html/templates_c';
$smarty->cache_dir = '/home/' . $filepath . '/public_html/cache';
$smarty->config_dir = '/home/' . $filepath . '/public_html/configs';
i set chmod the templates_c and cache folder to 777
then i have this code:
$page = 'index';
$section = 'index';
$smarty->assign('smarty', $smarty);
$smarty->assign('page', $page);
$smarty->assign('section', $section);
$smarty->display('template.tpl');
i have a template called template.tpl inside the template forlder.
and if i go to my site im getting the following error message: Warning: Smarty error: unable to read resource: "template.tpl" in /home/xhclznld/smarty/libs/Smarty.class.php on line 1095
PLEASE ANY HELP WILL BE APPRECIATED
thanks
jeremie