🐘
db_config.php
Back
📝 Php ⚡ Executable Ctrl+S: Save • Ctrl+R: Run • Ctrl+F: Find
<?php // Database configuration - include this in all your PHP files define('DB_HOST', 'localhost'); define('DB_NAME', 'hosting_platform'); define('DB_USER', 'root'); define('DB_PASS', 'test'); // Replace with your actual password function getDB() { try { $pdo = new PDO( "mysql:host=" . DB_HOST . ";dbname=" . DB_NAME, DB_USER, DB_PASS, [ PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC ] ); return $pdo; } catch(PDOException $e) { die("Database connection failed: " . $e->getMessage()); } } // Other platform settings define('SITE_URL', 'http://108.61.85.3'); define('ADMIN_EMAIL', '[email protected]'); define('DEFAULT_AI_CREDITS', 100); ?>