在服务器端代码更新之前需要多次刷新? [英] takes many refreshes before server side code is updated?

查看:117
本文介绍了在服务器端代码更新之前需要多次刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Bitnami WAMP Stack.每当我在IDE中编辑php文件(我正在使用netbeans,也尝试过phpstorm)时,在更新页面之前,浏览器都会进行4-5次刷新.我首先虽然说这是Google Chrome浏览器中的缓存问题,但是我也尝试了禁用历史记录的Mozilla Firefox.仍然有同样的问题.

I am using Bitnami WAMP Stack. Whenever I edit a php file in my IDE(I am using netbeans, have also tried phpstorm), it take 4-5 refreshes in the browser, before the page is updated. I first though that it was a cache issue in Google Chrome, but, I also tried Mozilla Firefox with history disabled. Still have the same problem.

任何想法,可能是什么原因造成的?

Any ideas, what could be causing this?

P.S:这也发生在服务器端代码中. Laravel中的控制器.

P.S: this happens with server side code too.. eg. Controllers in Laravel.

推荐答案

Bitnami开发人员在这里,

Bitnami developer here,

如果您是在AMP堆栈上进行开发,则服务器可能会缓存文件(例如JavaScript文件),即使您对其进行修改,您的更改也似乎不会被应用.

If you are developing on top of an AMP Stack, your files (like JavaScript files) may be cached by the server and even you modify them your changes will not appear to be applied.

为了禁用服务器中的缓存并在每次需要禁用OPCache时让文件被提供,这在PHP中是默认启用的.

In order to disable cache in the server and let the files being served each time you need to disable OPCache, enabled by default in PHP.

要禁用它,请在您的php.ini文件中更改opcache.enable并将其设置为0(installdir/php/php.ini)

To disable it, change opcache.enable in your php.ini file and set it to 0 (installdir/php/php.ini)

然后,重新启动安装服务.

After that, restart the services of the installation.

您可以在以下链接中了解更多信息.

You can learn more about this in the following link.

我希望它会有所帮助. 乔塔

I hope it helps. Jota

这篇关于在服务器端代码更新之前需要多次刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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