Update: 2026-06-15 01:37:40

This commit is contained in:
Hamza-Ayed
2026-06-15 01:37:41 +03:00
parent f021ba5a35
commit 2321b78244
164 changed files with 1356 additions and 1560 deletions

View File

@@ -7,8 +7,16 @@
declare(strict_types=1);
// 1. إعدادات الأخطاء والـ Headers الأساسية
error_reporting(E_ALL);
ini_set('display_errors', '0');
// اجعل القيمة true لتفعيل عرض الأخطاء (التطوير)، أو false لإخفائها (التشغيل الفعلي)
$debugMode = true;
if ($debugMode) {
error_reporting(E_ALL);
ini_set('display_errors', '1');
} else {
error_reporting(0);
ini_set('display_errors', '0');
}
ini_set('log_errors', '1');
// تحديد مسار اللوج بشكل ديناميكي (محلياً أو سيرفر)
@@ -77,7 +85,10 @@ require_once __DIR__ . '/Auth/JwtService.php';
// 6. تهيئة Encryption Helper العام (للتوافقية)
// يتم استخدام .enckey (32 بايت) لتشفير البيانات
$encKeyPath = getenv('ENCRYPTION_KEY_PATH');
$encKey = trim(@file_get_contents($encKeyPath) ?: '');
$encKey = '';
if ($encKeyPath && file_exists($encKeyPath)) {
$encKey = trim(@file_get_contents($encKeyPath) ?: '');
}
if (!$encKey) {
$encKey = getenv('ENC_KEY') ?: '';
}