1
0
Fork 0
forked from are0h/tapes
tapes/index.php
Ro b72650ed2f Intial Project Commit
first commit to get all the project files in there
2025-03-05 16:14:37 -06:00

24 lines
513 B
PHP

<?php
// Load all the classes we need
require __DIR__ . "/brain/Loader.php";
require __DIR__ . "/vendor/autoload.php";
use brain\controllers\RouteController;
// Capture URI
$request = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
// Strip leading /
//$request = ltrim($request, " / ");
$route = new RouteController();
// Match route and dispatch
try {
$route->start($request);
} catch (Exception $e) {
// No route found
http_response_code(404);
require __DIR__ . "/src/views/404.php";
}