added www

This commit is contained in:
2026-01-25 02:47:13 +00:00
parent 5d1c47d46b
commit 22c26fd4e4
8 changed files with 115 additions and 2 deletions

15
www/test_db_pdo.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
$DBuser = 'root';
$DBpass = $_ENV['MYSQL_ROOT_PASSWORD'];
$pdo = null;
try{
$database = 'mysql:host=database:3306';
$pdo = new PDO($database, $DBuser, $DBpass);
echo "Success: A proper connection to MySQL was made! The docker database is great.";
} catch(PDOException $e) {
echo "Error: Unable to connect to MySQL. Error:\n $e";
}
$pdo = null;