Update: 2026-05-04 02:03:26

This commit is contained in:
Hamza-Ayed
2026-05-04 02:03:26 +03:00
parent 2af604df7f
commit ee37a4fa52
2 changed files with 21 additions and 11 deletions

View File

@@ -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);