禁用php文件缓存进行调试 [英] disable php files caching for debugging

查看:41
本文介绍了禁用php文件缓存进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个安装了zpanel和apache2-php-mysql的vps.

I have a vps with zpanel installed and apache2 - php - mysql.

我正在为使用php的网站开发一个小型后端,对于准备发布这种情况的网站来说是完美的,但是现在我需要禁用缓存php文件的服务器功能,以立即测试php的正确(最后修改版本)我的php文件.这是因为在编辑html和js文件后,它们会立即正确重新加载,而使用php则需要很长时间才能更新,否则我必须重新启动服务器.

I'm developing a small backend for a website in php, for sites ready to publish the situation is perfect, but now I need to disable the server feature that caches php files to test instantly the correct (last modified version) of my php files. This is because while html and js files, when edited, are reloaded correctly immediately, with php I have a long wait before it updates or I have to restart the server.

我试图打开php.ini并查找缓存"并将几乎所有值设置为"1"毫秒,但是没有运气.我可以尝试什么?

I tried to open php.ini and look for "cache" and set to "1" millisecond almost all the values with no luck. what could I try?

P.S.这不是浏览器缓存问题,而是服务器端问题.

P.S. it's not a browser cache problem, that's a server side problem.

推荐答案

已解决:在php.ini中,我用

Solved: inside php.ini I added a line with

apc.enabled=0

此后,我重新启动了apache2,现在php文件按应有的方式进行了及时更新

after that I restarted apache2 and now php files are updated istantly as they should

感谢您调查phpinfo的建议

thanks for the suggestion to look into phpinfo

这篇关于禁用php文件缓存进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆