PHP7禁止缓存的方法:1、找到安装目录下的PHP.ini文件;2、修改“opcache.enable=1 opcache.enable_cli=1”;3、重启服务。
本文操作环境:Windows7系统、PHP7.1版、DELL G3电脑
比如,/usr/local/PHP7/etc/PHP.ini
将如下两行的1改为0:
[opcache] ; Determines if Zend OPCache is enabled opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP opcache.enable_cli=1
重启服务:
service PHP-fpm restart
推荐学习:《PHP教程》