Skip to content

Commit

Permalink
Forcer l'encodage en UTF8 des chaînes provenant du serveur
Browse files Browse the repository at this point in the history
  • Loading branch information
MjstcQueentin committed Jan 8, 2024
1 parent 4d51ad1 commit d1de5bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion database/Database.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ class Database

function __construct()
{
$this->pdo = new PDO("mysql:host=" . DATABASE['host'] . ";dbname=" . DATABASE['dbname'], DATABASE["user"], DATABASE["pwd"]);
$this->pdo = new PDO("mysql:host=" . DATABASE['host'] . ";dbname=" . DATABASE['dbname'], DATABASE["user"], DATABASE["pwd"], [
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
]);
}

public function select_settings()
Expand Down

0 comments on commit d1de5bd

Please sign in to comment.