Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9e23c59ef | |||
| f89e8106f5 | |||
| 2f02c5af12 |
+4
-1
@@ -37,7 +37,7 @@ class Scanner extends Component
|
|||||||
public function load_directory(string $path): void
|
public function load_directory(string $path): void
|
||||||
{
|
{
|
||||||
$dir = new \DirectoryIterator($path);
|
$dir = new \DirectoryIterator($path);
|
||||||
$skip = \config('scanner.skip', []);
|
$skip = \config('site.scanner.skip', []);
|
||||||
foreach ($dir as $value) {
|
foreach ($dir as $value) {
|
||||||
if ($value->isDot() || str_starts_with($value->getFilename(), '.')) {
|
if ($value->isDot() || str_starts_with($value->getFilename(), '.')) {
|
||||||
continue;
|
continue;
|
||||||
@@ -82,6 +82,9 @@ class Scanner extends Component
|
|||||||
private function load_file(string $path): void
|
private function load_file(string $path): void
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
opcache_invalidate($path);
|
||||||
|
opcache_compile_file($path);
|
||||||
|
|
||||||
require_once "$path";
|
require_once "$path";
|
||||||
if (!isset($_SERVER['PWD'])) {
|
if (!isset($_SERVER['PWD'])) {
|
||||||
$_SERVER['PWD'] = APP_PATH;
|
$_SERVER['PWD'] = APP_PATH;
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0",
|
"php": ">=8.4",
|
||||||
"psr/container": "^2.0"
|
"psr/container": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|||||||
Reference in New Issue
Block a user