phpcms v9如何关闭缓存-PHPCMS

资源魔 37 0

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若何封闭缓存的具体内容,更多请存眷资源魔其它相干文章!

标签: phpcms phpcms教程 phpcms技巧 php问题解决

抱歉,评论功能暂时关闭!