Update: 2026-05-04 02:03:26
This commit is contained in:
@@ -14,6 +14,16 @@ define('STORAGE_PATH', ROOT_PATH . '/storage');
|
||||
require_once APP_PATH . '/bootstrap/env.php';
|
||||
require_once APP_PATH . '/helpers/helpers.php';
|
||||
|
||||
// Self-healing Storage
|
||||
$dirs = ['/cache', '/logs', '/invoices', '/exports'];
|
||||
foreach ($dirs as $d) {
|
||||
$path = STORAGE_PATH . $d;
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path, 0777, true);
|
||||
chmod($path, 0777);
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Error Reporting (Secure for production)
|
||||
if (env('APP_DEBUG', 'false') === 'true') {
|
||||
error_reporting(E_ALL);
|
||||
|
||||
Reference in New Issue
Block a user