启用OPCache不在WAMP中工作

Hel*_*Man 7 wamp opcache

我试图在WAMP 3中为Drupal 8.0.4启用OPCache但是它不起作用.所以我用google搜索并更改了我的php.ini文件中的一些内容,这是我更改的内容:

opcache.enable=0
Run Code Online (Sandbox Code Playgroud)

opcache.enable=1
Run Code Online (Sandbox Code Playgroud)

并且

opcache.enable_cli=0
Run Code Online (Sandbox Code Playgroud)

opcache.enable_cli=1
Run Code Online (Sandbox Code Playgroud)

但是,'!' 标记出现在PHP扩展附近.当我尝试获取日志时,它说:

Sorry,

The 'php_opcache' extension cannot be loaded by 'extension=php_opcache.dll' in php.ini. Must be loaded by 'zend_extension='.

Switch cancelled

Press ENTER to continue...
Run Code Online (Sandbox Code Playgroud)

但是在PHP.ini文件中它说:

zend_extension ="C:/wamp/bin/php/php7.0.0/ext/php_opcache.dll"
Run Code Online (Sandbox Code Playgroud)

我还应该做些什么才能启用OPCache?

Jac*_*ack 5

转到 PHP 配置/php.ini 文件并在页面末尾添加这两行

zend_extension=php_opcache.dll

; 确定 Zend OPCache 是否启用

opcache.enable=1

您还可以增加 php.ini 配置文件的最大执行时间。

最大执行时间=180

希望能帮助到你。