smarty3 clearCache不起作用,返回值是0

eightwhells 2014-03-27 11:04:05
代码片段
配置
$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();
}
...全文
69 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

21,886

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧