当前位置:首页站长学院PHPCMSphpcms v9如何关闭缓存
企业营销,就选知企PROSAAS

phpcms v9如何关闭缓存

phpcms v9如何关闭缓存

phpcms v9如何关闭缓存

去掉phpcms的模板缓存

最近在使用phpcms做个简单的东西,由于太简单了,所以直接在ftp上调试了,但是上传了模板文件,但是前台一直不刷新,都到要缓存目录下去删除生成的缓存php,来回操作几次感觉好烦,但是在网上没有找到合适的文章来关掉他,所以就简单粗爆地,先干掉缓存了

global.func.php中有函数名为

function template($module = 'content', $template = 'index', $style = '')
  if (file_exists(PC_PATH . 'templates' . DIRECTORY_SEPARATOR . $style . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . $template . '.html'))
  {
      if (!file_exists($compiledtplfile) || (@filemtime(PC_PATH . 'templates' . DIRECTORY_SEPARATOR . $style . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . $template . '.html') > @filemtime($compiledtplfile)))
      {
          $template_cache->template_compile($module, $template, $style);
      }
  }

把里边的 if 去掉就可以了,这样多么简单粗暴啊,这样每次都从编译一下,不过一个简单的小项目这个也不用太在意了

  if (file_exists(PC_PATH . 'templates' . DIRECTORY_SEPARATOR . $style . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . $template . '.html'))
  {
    //  if (!file_exists($compiledtplfile) || (@filemtime(PC_PATH . 'templates' . DIRECTORY_SEPARATOR . $style . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . $template . '.html') > @filemtime($compiledtplfile)))
     // {
          $template_cache->template_compile($module, $template, $style);
     // }
  }

PHP中文网,大量的免费PHPCMS教程,欢迎在线学习!

以上就是phpcms v9如何关闭缓存的详细内容,更多请关注知企PROSAAS其它相关文章!

温馨提示:

文章标题:phpcms v9如何关闭缓存

文章链接:https://ceshi.prosaas.cn/4274.html

更新时间:2019年12月27日

声明: 本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:973664285@qq.com我们将第一时间处理! 资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。 所有资源仅限于参考和学习,版权归原作者所有,更多请阅读知企PROSAAS协议

给TA打赏
共{{data.count}}人
人已打赏
PHPCMS

phpcms v9不能生成静态页面怎么办

2019-12-27 10:38:09

PHPCMS

phpcms v9无法连接数据库怎么办

2019-12-27 10:49:42

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索