diff --git a/tp2/index.php b/tp2/index.php index 842a6f3db5a15713a48b521201c5041fce43e86c..df24f6f1b9e18d782eaf4289cce31cb2060f6934 100644 --- a/tp2/index.php +++ b/tp2/index.php @@ -14,17 +14,7 @@ use \Slim\Slim; $db = new DB(); // ajout des informations pour se connecter à la base de données -$ini_file = parse_ini_file('src/conf/conf.ini'); -$db->addConnection([ - 'driver' => $ini_file['driver'], - 'host' => $ini_file['host'], - 'database' => $ini_file['database'], - 'username' => $ini_file['username'], - 'password' => $ini_file['password'], - 'charset' => $ini_file['charset'], - 'collation' => $ini_file['charset'] . '_unicode_ci', - 'prefix' => '' -]); +$db->addConnection(parse_ini_file('conf/conf.ini')); // demarage de la basse de donnée $db->setAsGlobal();