mirror of
https://github.com/pierre42100/comunic
synced 2025-06-20 17:15:19 +00:00
First commit
This commit is contained in:
21
connexiondb.php
Executable file
21
connexiondb.php
Executable file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Database connexion file
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
//R<>cup<75>ration du fichier de configuration
|
||||
include('inc/config/config.php');
|
||||
|
||||
//Connexion <20> la base de donn<6E>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();
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user