.env en moins normalement

This commit is contained in:
Yasder5 2026-03-03 20:41:35 +01:00
parent f1ef53c4ac
commit c8343faec7
4 changed files with 9 additions and 12 deletions

View file

@ -10,9 +10,9 @@
public function __construct(){
try{
$this->_db = new PDO(
"mysql:host=localhost;dbname=projet_folliow",
"projet_user",
"F0lliowRules!",
"mysql:host=".$_ENV['DB_HOSTNAME'].";dbname=".$_ENV['DB_DATABASE'],
$_ENV['DB_USERNAME'],
$_ENV['DB_PASSWORD'],
array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC)
);
$this->_db->exec("SET CHARACTER SET utf8");