Copie propre du code final de Folliow (projet d'équipe DWWM)

This commit is contained in:
Yasser Boulayoune 2026-03-06 18:00:00 +01:00
commit eed64cfeb6
67 changed files with 17897 additions and 0 deletions

24
models/MotherModel.php Normal file
View file

@ -0,0 +1,24 @@
<?php
namespace Models;
use \PDO;
class MotherModel {
protected $_db;
public function __construct(){
try{
$this->_db = new PDO(
"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");
$this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException$e) {
echo "Échec : " . $e->getMessage();
}
}
}