mirror of
https://github.com/pierre42100/comunic
synced 2024-11-16 18:41:13 +00:00
21 lines
511 B
PHP
Executable File
21 lines
511 B
PHP
Executable File
<?php
|
|
/**
|
|
* Database connexion file
|
|
*
|
|
* @author Pierre HUBERT
|
|
*/
|
|
|
|
//Récupération du fichier de configuration
|
|
include('inc/config/config.php');
|
|
|
|
//Connexion à la base de données
|
|
try {
|
|
$bdd = new PDO('mysql:host='.$hotedb.';dbname='.$nomdb, $userdb, $passworddb);
|
|
} catch(Exception $e) {
|
|
include(pagesRelativePath('common/head.php'));
|
|
include(pagesRelativePath('common/pageTop.php'));
|
|
echo'<p>Une erreur est survenue.<a href="index.php">Réessayer</a></p>';
|
|
die();
|
|
}
|
|
|
|
?>
|