本文介绍了使用Zend Opcache将目录列入黑名单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何告诉Zend Opcache 缓存特定目录中的任何文件.例如/var/www/public_html/devzone/*

How can i tell Zend Opcache not to cache any files from a specific directory.For e.g /var/www/public_html/devzone/*

我将PHP 5.5.13Zend OPcache v7.0.4-dev一起使用

推荐答案

您应设置配置值以及您的黑名单的文件路径.

You should set the opcache.blacklist_filename configuration value with a file path to your blacklist.


例如,创建一个新文件:


For example, create a new file:

/etc/php5/opcache-blacklist.txt

使用通配符设置保存:

/var/www/public_html/devzone/*

并将黑名单文件路径添加到您的php.ini:

And add the blacklist file path to your php.ini:

opcache.blacklist_filename=/etc/php5/opcache-blacklist.txt

这篇关于使用Zend Opcache将目录列入黑名单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-11 22:15