3 Commits

Author SHA1 Message Date
as2252258 f9e23c59ef 添加opcache重置
Signed-off-by: 向林 <as2252258@163.com>
2025-12-22 06:57:32 +00:00
as2252258 f89e8106f5 eee 2025-12-18 15:39:42 +08:00
as2252258 2f02c5af12 eee 2025-07-14 15:34:56 +08:00
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -37,7 +37,7 @@ class Scanner extends Component
public function load_directory(string $path): void
{
$dir = new \DirectoryIterator($path);
$skip = \config('scanner.skip', []);
$skip = \config('site.scanner.skip', []);
foreach ($dir as $value) {
if ($value->isDot() || str_starts_with($value->getFilename(), '.')) {
continue;
@@ -82,6 +82,9 @@ class Scanner extends Component
private function load_file(string $path): void
{
try {
opcache_invalidate($path);
opcache_compile_file($path);
require_once "$path";
if (!isset($_SERVER['PWD'])) {
$_SERVER['PWD'] = APP_PATH;
+1 -1
View File
@@ -9,7 +9,7 @@
],
"license": "MIT",
"require": {
"php": ">=8.0",
"php": ">=8.4",
"psr/container": "^2.0"
},
"autoload": {