Téléverser les fichiers vers "include"
This commit is contained in:
13
include/db.php
Normal file
13
include/db.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
$host = 'localhost';
|
||||||
|
$dbname = 'cms_simplifie';
|
||||||
|
$username = 'root';
|
||||||
|
$password = '';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password);
|
||||||
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
die("Erreur de connexion : " . $e->getMessage());
|
||||||
|
}
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user