Xampp和Ampps更改后不会重新加载文件 [英] Xampp and Ampps don't reload files when changed

查看:86
本文介绍了Xampp和Ampps更改后不会重新加载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我更改目录中的文件时,通过本地主机访问该更改时,该更改不会反映在显示的网页上,但是当我直接通过系统上的文件路径访问该更改时,就会显示该更改.为什么?

我在Windows计算机上.我的文件存储在C:\ Program Files(x86)\ Ampps \ www \ connor.dev中.当我直接引用文件时,通过在浏览器中转到这样的链接,文件:///C:/Program%20Files%20(x86)/Ampps/www/connor.dev/index.php,显示并保存在Sublime Text中.当我通过转到localhost/connor.dev/访问它时,更改不会显示.即使我完全删除了文件,该文件仍会显示在localhost中.这是最近在xampp上开始发生的,所以我卸载了它并使用了Ampps,现在发生了同样的事情.如果您需要更多信息,请询问.

解决方案

按Ctrl-F5硬刷新页面(不使用浏览器的缓存).

如果您仍然看到先前的页面或更改,则Apache对其进行了mod_cache缓存,或者PHP将其操作码缓存设置设置为在X时间内不刷新更改.

When I change a file in the directory, the change is not reflected on the web page shown when I access it through localhost, but it is shown when I access it directly by the file path on my system. Why?

I am on a Windows machine. My files are stored at C:\Program Files (x86)\Ampps\www\connor.dev . When I directly reference a file, by going to a link like this in the browser, file:///C:/Program%20Files%20(x86)/Ampps/www/connor.dev/index.php, the changes I made and saved in Sublime Text are shown. When I access it by going to localhost/connor.dev/, the changes are not shown. Even if I delete the file completely, it is still shown in localhost. This started happening recently on xampp, so I uninstalled it and used Ampps, and now the same thing is happening. If you need more info please ask.

解决方案

Press Ctrl-F5 to hard refresh the page (to not use Browser's cache).

If you still see the previous pages or changes, then Apache has mod_cache caching them, or PHP has its opcode cache settings set to not refresh changes for X amount of time.

这篇关于Xampp和Ampps更改后不会重新加载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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