Téléverser les fichiers vers "poo.php"
This commit is contained in:
parent
86409521d1
commit
1d86338621
16
poo.php/poo.php
Normal file
16
poo.php/poo.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