From 454246ff4ce08ff04f4fa01ef2e2b9bfcca2d58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <tardieuloc@yahoo.fr> Date: Wed, 11 Mar 2020 09:33:32 +0100 Subject: [PATCH] Opti de la conf --- tp2/index.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tp2/index.php b/tp2/index.php index 842a6f3..df24f6f 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(); -- GitLab