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

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

问题描述

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

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?

我在一台 Windows 机器上.我的文件存储在 C:Program Files (x86)Amppswwwconnor.dev .当我直接引用一个文件时,通过在浏览器中访问这样的链接,file:///C:/Program%20Files%20(x86)/Ampps/www/connor.dev/index.php,我所做的更改显示了在 Sublime Text 中制作和保存的内容.当我通过 localhost/connor.dev/访问它时,没有显示更改.即使我完全删除了文件,它仍然显示在 localhost 中.这最近开始在 xampp 上发生,所以我卸载了它并使用了 Ampps,现在同样的事情正在发生.如果您需要更多信息,请询问.

I am on a Windows machine. My files are stored at C:Program Files (x86)Amppswwwconnor.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.

推荐答案

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

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

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

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天全站免登陆