if(!file_exists($objfile)) {
include_once(S_ROOT.'./source/function_template.php');
parse_template($tpl);
}
include_once(S_ROOT.'./source/function_template.php');
parse_template($tpl);
}
修改成:
//if(!file_exists($objfile)) {
include_once(S_ROOT.'./source/function_template.php');
parse_template($tpl);
//}
include_once(S_ROOT.'./source/function_template.php');
parse_template($tpl);
//}
这样修改模板后就不用到后台更新缓存了
下面开始讲一下模板中常用的标签及变量输出。
一、变量:
如我们在PHP文件中定义了一个变量并赋值了,如:
$siteUrl='http://www.yiqi123.cn';
$siteName='找插件网';
$siteName='找插件网';
那么如何在模板中输出呢?其实这个很简单:
站点地址:$siteUrl
站点名称:$siteName
就可以输出结果:
站点地址:
foreach($s as $key=>$value){
echo $value
}
echo $value
}