如何不登录Discuz后台刷新模板缓存

Discuz修改后,缓存的模板常常无法更新,为了不总是麻烦客户,要求后台管理密码,最好的办法就是用程序来刷新。方法很简单:

先手工删除forumdata/templates里面的缓存模板文件,再运行:
if(!file_exists($objfile)){
require_once DISCUZ_ROOT.’./include/template.func.php’;
parse_template($tplfile, $templateid, $tpldir);
}