看到实时更改之间的MAMP时间 [英] MAMP time between seeing live changes

查看:85
本文介绍了看到实时更改之间的MAMP时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用MAMP服务器,想知道为什么在刷新页面(在浏览器中)时不会立即显示对PHP文件所做的更改.有办法设置吗? MAMP上没有缓存设置.我必须等待20秒或停止然后重新启动服务器.

I'm using MAMP server and wondering why changes I make to the PHP files are not instantaneously displayed when I page refresh (in browser). Is there a way to set this up? There are no caching settings on MAMP. Either I have to wait 20 seconds or stop and restart the server.

推荐答案

解决方案是取消注释php.ini文件中的行,该文件可在/MAMP Directory/bin/php/php5.5.3/conf/php.ini中找到

The solution is uncommenting lines in the php.ini file which can be found in /MAMP Directory/bin/php/php5.5.3/conf/php.ini

注释Opcache:

[OPcache]
;zend_extension="/Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212/opcache.so"
;  opcache.memory_consumption=128
;  opcache.interned_strings_buffer=8
;  opcache.max_accelerated_files=4000
;  opcache.revalidate_freq=60
;  opcache.fast_shutdown=1
;  opcache.enable_cli=1

文档(是从5.5开始的):

Documentation (yes it started in 5.5):

http://www.php.net/manual/en/intro.opcache.php

这篇关于看到实时更改之间的MAMP时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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