Etudes/BTS/Web/Premiere annee/MonBeauVraiSite/php/inc/manipBD.inc.php

12 lines
280 B
PHP
Raw Permalink Normal View History

2016-10-14 15:52:18 +00:00
<?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;
}