Téléverser les fichiers vers "includes"

This commit is contained in:
2025-11-17 19:17:04 +00:00
parent 72e147e89a
commit 7d3e18df95
3 changed files with 31 additions and 0 deletions

13
includes/db.php Normal file
View 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());
}
?>

6
includes/footer.php Normal file
View File

@@ -0,0 +1,6 @@
<hr>
<footer>
<p>&copy; 2025 - Mon CMS Simplifié</p>
</footer>
</body>
</html>

12
includes/header.php Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Mon CMS Simplifié</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<h1><a href="index.php">Mon CMS Simplifié</a></h1>
<hr>
</header>