微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

php – 使用Zend Opcache列出目录

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

我使用PHP 5.5.13与Zend OPcache v7.0.4-dev

您应该将 opcache.blacklist_filename配置值设置为黑名单的文件路径.

The location of the OPcache blacklist file. A blacklist file is a text file containing the names of files that should not be accelerated,one per line. Wildcards are allowed,and prefixes can also be provided. Lines starting with a semi-colon are ignored as comments.

例如,创建一个文件

/etc/PHP5/opcache-blacklist.txt

使用通配符设置保存:

/var/www/public_html/devzone/*

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

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

原文地址:https://www.jb51.cc/php/131123.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐