Téléverser les fichiers vers "/"

This commit is contained in:
kilian.te 2025-05-06 12:42:16 +00:00
parent 24f7d4f2f4
commit 409e1900b7

16
pdo.php Normal file
View File

@ -0,0 +1,16 @@
<?php
$host = 'BIBLI_mysql.1.i8wx4whemywdg9gzngwaxwra3'; // 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>";
}
?>