This commit is contained in:
dongzhiyong
2025-12-23 14:39:55 +08:00
parent c643be8548
commit 34685ead22
2 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -82,8 +82,10 @@ class Scanner extends Component
private function load_file(string $path): void private function load_file(string $path): void
{ {
try { try {
opcache_invalidate($path); if (function_exists('opcache_invalidate') && function_exists('opcache_compile_file')) {
opcache_compile_file($path); opcache_invalidate($path);
opcache_compile_file($path);
}
require_once "$path"; require_once "$path";
if (!isset($_SERVER['PWD'])) { if (!isset($_SERVER['PWD'])) {
+2 -1
View File
@@ -10,7 +10,8 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": ">=8.4", "php": ">=8.4",
"psr/container": "^2.0" "psr/container": "^2.0",
"ext-zend-opcache": "*"
}, },
"version": "v2.17", "version": "v2.17",
"autoload": { "autoload": {