位置:- 正文

phpcms v9如何关闭缓存(关闭php报错)

编辑:rootadmin
phpcms v9关闭缓存的方法:首先打开“global.func.php”文件;然后查找函数“function template(){if (file_exists()}”部分;接着删除其中的“if”代码即可关闭缓存。

推荐整理分享phpcms v9如何关闭缓存(关闭php报错),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:php怎么关闭,phpcms v9如何关闭会员模块,phpcms v9如何关闭会员模块,cms怎么关闭,php怎么关闭,phpcms v9如何关闭会员管理链接,php怎么关闭,phpcms v9如何关闭会员模块,内容如对您有帮助,希望把文章链接给更多的朋友!

phpcms v9如何关闭缓存(关闭php报错)

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教程,欢迎在线学习!

本文链接地址:https://www.jiuchutong.com/zhishi/311793.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/311794.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络