4
My connection code shows no errors, what’s the problem, I searched several places and found nothing about it:
class Connect {
protected static $db;
public function __construct() {}
public static function Database() {
if (is_null(self::$db)) {
try {
self::$db = new PDO('mysql:host=' . HOSTNAME . ';dbname=' . DATABASE, USERNAME, PASSWORD);
self::$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die($e->getMessage());
}
}
return self::$db;
}
}
Now it has appeared, grateful...
– user76271