php smarty前后台模板路径的配置问题
我是新手,对smarty还是不怎么熟悉,我现在想把模板文件夹分为两个,前后台的,那在配置的时候是应该怎么配置呢,$smarty=newsmarty;$smarty->te...
我是新手,对smarty还是不怎么熟悉,我现在想把模板文件夹分为两个,前后台的,那在配置的时候是应该怎么配置呢,
$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="}>";
这里该怎么写?
难道一定要写两套吗? 展开
$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="}>";
这里该怎么写?
难道一定要写两套吗? 展开
2个回答
展开全部
$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对象做相应的设置就行啦。
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对象做相应的设置就行啦。
展开全部
$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对象做相应的设置就行啦。
$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对象做相应的设置就行啦。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询