21,890
社区成员
发帖
与我相关
我的任务
分享
require_once('class/libs/Smarty.class.php');
$smarty=new Smarty();
$smarty->template_dir = '/templates/';
$smarty->compile_dir = '/templates_c/'; //把这个注解就不会报错,而templates_c里也会生成缓存文件,因为用了Smarty类的默认路径
$smarty->config_dir = '/configs/';
$smarty->cache_dir = '/cache/';
$smarty->display('header.html');
require_once('class/libs/Smarty.class.php');
$smarty=new Smarty();
$smarty->template_dir = '/templates/';
$smarty->compile_dir = '/templates_c/'; //把这行注解掉,就不报错了,而且在根目templates_c下也会生成缓存文件
$smarty->right_delimiter = '}-->';
$smarty->display('header.html');