Update DB.php

This commit is contained in:
Axel 2021-12-17 19:04:50 +01:00 committed by GitHub
parent c9bf661626
commit 5b87f3c580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,7 @@ class DB {
if (! is_resource($this->link)) {
$dsn = $_ENV['DB_TYPE'].':dbname='.$_ENV['DB_NAME'].';host='.$_ENV['DB_HOST'].';port='.$_ENV['DB_PORT'];
$this->link = new PDO($dsn, $_ENV['DB_USER'], $_ENV['DB_PASSWORD']);
$this->link->query('SET NAMES "UTF8"');
}
}