繁体   English   中英

启用opcache并使用'require'关键字时,php是否将从文件系统中重新加载文件内容?

[英]Will php reload file content from filesystem when opcache is enable and use 'require' keyword?

我的应用程序使用require加载应用程序路由,像这样

require __DIR__ . '/Order.php';

我有开放的opcache扩展,配置是

enable_cli=1
memory_consumption=128
interned_strings_buffer=8
max_accelerated_files=4000
revalidate_freq=60
fast_shutdown=1
opcache.save_comments=0

我想知道php是否重新加载__DIR__ . '/Order.php' __DIR__ . '/Order.php'从文件系统的每一个要求,即使opcache是启用。

是的,如果要避免这种情况,请使用require_once

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM