mirror of
https://github.com/xodivorce/xeorl.git
synced 2025-12-20 00:29:34 +05:30
v4.2.3
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
<?php
|
||||
// Load Composer's autoloader
|
||||
require_once __DIR__ . '/vendor/autoload.php'; // Correct path for vendor directory in core
|
||||
|
||||
// Initialize dotenv and load environment variables
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../'); // Adjusted to point to htdocs/.env
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
|
||||
$dotenv->load();
|
||||
|
||||
// Database configuration
|
||||
$host = $_ENV['DB_HOST'];
|
||||
$user = $_ENV['DB_USER'];
|
||||
$pass = $_ENV['DB_PASS'];
|
||||
$db = $_ENV['DB_NAME'];
|
||||
|
||||
// Establish database connection
|
||||
$conn = mysqli_connect($host, $user, $pass, $db);
|
||||
if (!$conn) {
|
||||
die("Database connection error: " . mysqli_connect_error());
|
||||
|
||||
Reference in New Issue
Block a user