idk anymore! please put the dog down (me)!

This commit is contained in:
2026-04-19 19:22:38 +02:00
commit b6a258b3cf
16 changed files with 324 additions and 0 deletions

27
public/index.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
use Controllers\HomeController;
use src\Database;
session_start();
spl_autoload_register(function ($class) {
$file = __DIR__ . '/../' . str_replace('\\', '/', $class) . '.php';
if (file_exists($file)) {
require_once $file;
}
});
require_once __DIR__ . '/../src/Controllers/HomeController.php';
require_once __DIR__ . '/../src/Database.php';
$path = $_SERVER['REQUEST_URI'] ?? '/';
if ($path === '/') {
$db = Database::getInstance();
$controller = new HomeController($db);
$controller->index();
}