Update: 2026-05-05 16:31:41
This commit is contained in:
@@ -62,7 +62,7 @@ header("X-XSS-Protection: 1; mode=block");
|
||||
header("Referrer-Policy: strict-origin-when-cross-origin");
|
||||
header("Strict-Transport-Security: max-age=31536000; includeSubDomains"); // I1 Fix: HSTS
|
||||
|
||||
// 6. Intelligent Autoloader (Case-Insensitive for directories)
|
||||
// 6. PSR-4 Autoloader (PascalCase-aware for Linux compatibility)
|
||||
spl_autoload_register(function ($class) {
|
||||
$prefix = 'App\\';
|
||||
$base_dir = APP_PATH . '/';
|
||||
@@ -74,7 +74,7 @@ spl_autoload_register(function ($class) {
|
||||
|
||||
$parts = explode('\\', $relative_class);
|
||||
$filename = array_pop($parts) . '.php';
|
||||
$dir = strtolower(implode('/', $parts));
|
||||
$dir = implode('/', $parts); // No strtolower — preserves PascalCase on Linux
|
||||
|
||||
$file = $base_dir . ($dir ? $dir . '/' : '') . $filename;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user