conn = null; try { $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name.";charset=UTF8", $this->username, $this->password); } catch (PDOException $exception) { echo "Ошибка соединения с БД: " . $exception->getMessage(); } return $this->conn; } }