Replace old structure with new structure

This commit is contained in:
MosLaptop\Not.Reda
2025-08-28 09:28:59 +02:00
parent ea58af4fcc
commit 69dd02eb91
28 changed files with 552 additions and 62 deletions

20
Tests/connectionTest.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
use App\Config\Database;
require_once __DIR__ . '/../App/Config/Database.php'; // Adjusted to use a relative path
try {
// Create an instance of the Database class
$db = new class extends Database {};
// Establish a connection using the linkDB method
$pdo = $db->linkDB();
// If the connection is successful
echo "Connected successfully using PDO";
} catch (Exception $e) {
// Handle connection error
error_log($e->getMessage()); // Log the error message
echo "An error occurred while connecting to the database. Please try again later.";
}