Update: 2026-06-15 01:37:40
This commit is contained in:
@@ -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') ?: '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user