HEX
Server: Apache
System: Linux infong-uk86 4.4.400-icpu-106 #2 SMP Mon Sep 15 08:23:40 UTC 2025 x86_64
User: u44115835 (4976590)
PHP: 8.4.17
Disabled: NONE
Upload Files
File: /homepages/29/d194883696/htdocs/firstnetworking/models/Database.php
<?php
/*
** Database Configurations
*/

class Database{
	protected static $init = false;

	private function __construct(){}

	public static function init(){
		if(self::$init == false){
			$DSN = new Config;
			$DSN->setupDNS();
			$DSN = $DSN->loadDsn();
			try{
				self::$init = new PDO("mysql:host=" . $DSN['host'] . ";dbname=".$DSN['dbname'], $DSN['username'], $DSN['password']);
			}catch(Exception $e){
				die($e->getMessage());
			}
		}
		return self::$init;
	}

	public function queryDb($sql){
		//query db
	}

	private function __wakeUp(){}
}
?>