Update: 2026-05-14 19:26:32

This commit is contained in:
Hamza-Ayed
2026-05-14 19:26:32 +03:00
parent 8272065938
commit 22433b040e
431 changed files with 17953 additions and 11833 deletions

View File

@@ -5,9 +5,13 @@ require_once __DIR__ . '/../vendor/autoload.php';
use Dotenv\Dotenv;
// Load environment variables from .env
$dotenv = Dotenv::createImmutable(__DIR__ . '/..');
$dotenv->load();
// Load environment variables from .env (located in the project root)
$dotenv = Dotenv::createImmutable(__DIR__ . '/../..');
try {
$dotenv->load();
} catch (Exception $e) {
// If .env is missing, we continue and rely on system env or defaults
}
$host = $_ENV['DB_HOST'] ?? 'localhost';
$dbname = $_ENV['DB_NAME'] ?? 'jordan_bot_db';