Téléverser les fichiers vers "/"
This commit is contained in:
parent
24f7d4f2f4
commit
409e1900b7
16
pdo.php
Normal file
16
pdo.php
Normal 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>";
|
||||||
|
}
|
||||||
|
?>
|
Loading…
x
Reference in New Issue
Block a user