21,886
社区成员
发帖
与我相关
我的任务
分享
$smarty = new Smarty();
$smarty->template_dir = getPath('tplPath');
$smarty->compile_dir = getPath('complierPath');
$smarty->cache_dir = getPath('cachePath');
$smarty->left_delimiter = '<{';
$smarty->right_delimiter = '}>';
$smarty->caching = true;
$smarty->addConfigDir(getPath('confPath'),'one');
//如果对应的帖子缓存已经存在,则销毁对应的缓存
if($smarty->isCached('onePosts.html',"{$id}")){
echo $result = $smarty->clearCache('onePosts.html',"{$id}");
//echo $smarty->clearAllCache();
}