php 开字节码缓存了吧?
看看php 版本,新版默认开启opcache 了
修改 web 服务器配置文件,为静态文件
apache: 将 EnableSendfile on 改为 EnableSendfile off
nginx: 将 sendfile on; 改为 sendfile off;
php 开发时可以禁用,apc,opcode,xcache等。
问题一)使用 Apache/Nginx 时会出现诸如图片修改后但页面刷新仍然是旧文件的情况,是由于静态文件缓存造成的。需要对虚拟机里的 Apache/Nginx 配置文件进行修改:
#nginx配置
sendfile off
#apache 配置
EnableSendFile off
问题二:启动多个虚拟机提示错误“2222 端口 in use”
解决办法:(参考文章:Vagrant SSH errors with multiple VMs: Port 2222 in use)
config.vm.network "forwarded_port", guest: 22, host: 2220 ,id: 'ssh'
问题三:如果遇到 php 代码也感觉被缓存起来了,请关闭apc,opcode(从php5.5及以后版本默认开启opcode)
版权声明:本文为博主原创文章,原文永久地址:http://www.vincentguo.cn/default/26.html