Etudes/BTS/Web/Premiere annee/MonBeauVraiSite/php/inc/manipBD.inc.php
2016-10-14 17:52:18 +02:00

12 lines
280 B
PHP

<?php
require_once("config.inc.php");
function connexionBD() {
try {
$bdd = new PDO('mysql:host=' . SERVEURBD . ';dbname=' . NOMDELABASE, LOGIN, MOTDEPASSE);
} catch (Exception $ex) {
die('<br />Probleme de connexion serveur BD : ' . $ex->getMessage());
}
return $bdd;
}