php smarty前后台模板路径的配置问题
发布网友
发布时间:2022-05-29 09:41
我来回答
共2个回答
热心网友
时间:2023-10-14 19:35
$smarty=new
smarty;
$smarty->template_dir=base_path.smarty_path."templates/";
$smarty->compile_dir=base_path.smarty_path."templates_c/";
$smarty->config_dir=base_path.smarty_path."configs/";
$smarty->cache_dir=base_path.smarty_path."cache/";
//定义定界符
$smarty->left_delimiter='<{';
$smarty->right_delimiter="}>";
$smarty2
=
new
smarty;
$smarty->template_dir=front_path.smarty_path."templates/";
$smarty->compile_dir=front_path.smarty_path."templates_c/";
$smarty->config_dir=front_path.smarty_path."configs/";
$smarty->cache_dir=front_path.smarty_path."cache/";
//定义定界符
$smarty->left_delimiter='<{';
$smarty->right_delimiter="}>";
不一定几套,
你想弄几套都行,你只要为你实例化的smarty对象做相应的设置就行啦。
热心网友
时间:2023-10-14 19:35
$smarty=new smarty;
$smarty->template_dir=base_path.smarty_path."templates/";
$smarty->compile_dir=base_path.smarty_path."templates_c/";
$smarty->config_dir=base_path.smarty_path."configs/";
$smarty->cache_dir=base_path.smarty_path."cache/";
//定义定界符
$smarty->left_delimiter='<{';
$smarty->right_delimiter="}>";
$smarty2 = new smarty;
$smarty->template_dir=front_path.smarty_path."templates/";
$smarty->compile_dir=front_path.smarty_path."templates_c/";
$smarty->config_dir=front_path.smarty_path."configs/";
$smarty->cache_dir=front_path.smarty_path."cache/";
//定义定界符
$smarty->left_delimiter='<{';
$smarty->right_delimiter="}>";
不一定几套, 你想弄几套都行,你只要为你实例化的smarty对象做相应的设置就行啦。