Téléverser les fichiers vers "/"
This commit is contained in:
commit
f17e3ebf23
32
index.php
Normal file
32
index.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<title>Ma super bibliothèque</title>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<H1>Bibliothèque</H1>
|
||||||
|
|
||||||
|
<?php include("pdo.php"); ?>
|
||||||
|
|
||||||
|
<footer class="fixed-bottom d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top p-4">
|
||||||
|
<div>
|
||||||
|
<i class="bi bi-c-circle"></i> 2025 - LM I-Manager
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Version : 1.0.1
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
Connexion BDD : OK
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
16
pdo.php
Normal file
16
pdo.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
$host = 'bdd-bibli'; // nom du docker --name ma-base-sql
|
||||||
|
$db = 'bibliotheque';
|
||||||
|
$user = 'root';
|
||||||
|
$pass = 'passwordRoot';
|
||||||
|
$charset = 'utf8mb4';
|
||||||
|
|
||||||
|
$dsn = "mysql:host=$host;dbname=$db;charset=$charset";
|
||||||
|
|
||||||
|
try {
|
||||||
|
$pdo = new PDO($dsn, $user, $pass);
|
||||||
|
echo "<p style='color:green;'>Connexion réussie ✅</p>";
|
||||||
|
} catch (\PDOException $e) {
|
||||||
|
echo "<p style='color:red;'>Échec de la connexion ❌ : " . $e->getMessage() . "</p>";
|
||||||
|
}
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user