Delete comment

This commit is contained in:
kirill.khorkov
2025-12-16 19:18:03 +03:00
parent 474fe41d41
commit 8a93cf8657
59 changed files with 9767 additions and 10403 deletions

View File

@@ -1,32 +1,32 @@
<?php
// config/database.php
class Database {
private static $instance = null;
private $connection;
private function __construct() {
try {
$this->connection = new PDO(
"pgsql:host=185.130.224.177;port=5481;dbname=postgres",
"admin",
"38feaad2840ccfda0e71243a6faaecfd"
);
$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->connection->exec("SET NAMES 'utf8'");
} catch(PDOException $e) {
die("Ошибка подключения: " . $e->getMessage());
}
}
public static function getInstance() {
if (self::$instance == null) {
self::$instance = new Database();
}
return self::$instance;
}
public function getConnection() {
return $this->connection;
}
}
<?php
class Database {
private static $instance = null;
private $connection;
private function __construct() {
try {
$this->connection = new PDO(
"pgsql:host=185.130.224.177;port=5481;dbname=postgres",
"admin",
"38feaad2840ccfda0e71243a6faaecfd"
);
$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->connection->exec("SET NAMES 'utf8'");
} catch(PDOException $e) {
die("Ошибка подключения: " . $e->getMessage());
}
}
public static function getInstance() {
if (self::$instance == null) {
self::$instance = new Database();
}
return self::$instance;
}
public function getConnection() {
return $this->connection;
}
}
?>