From 0577ebf3ae6f2b8b4b9a6474b19df524bafd627c Mon Sep 17 00:00:00 2001 From: ycharbi Date: Tue, 18 May 2021 22:59:52 +0200 Subject: [PATCH] =?UTF-8?q?Objet=20de=20connexion=20=C3=A0=20la=20base=20S?= =?UTF-8?q?QLite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/bdd/connexion.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 services/bdd/connexion.php diff --git a/services/bdd/connexion.php b/services/bdd/connexion.php new file mode 100644 index 0000000..7b3ab0a --- /dev/null +++ b/services/bdd/connexion.php @@ -0,0 +1,16 @@ +setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +} +catch (Exception $e){ + die ("Erreur de connexion à la base \"$base\" : ".$e->getMessage()) ; +} + +?>