17 lines
613 B
PHP
17 lines
613 B
PHP
<?php
|
|
|
|
// Einfaches Routing (Microframework / Pure PHP) für tippspiel2027
|
|
// Dies stellt sicher, dass der Code maximal lesbar und zukunftssicher bleibt.
|
|
|
|
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
|
|
if ($uri === '/' || $uri === '/index.php') {
|
|
echo "<h1>Willkommen bei Tippspiel 2027</h1>";
|
|
echo "<p>Dies ist die Nachfolgeversion des alten Tippspiels (Pure PHP Variante).</p>";
|
|
} elseif ($uri === '/api/status') {
|
|
header('Content-Type: application/json');
|
|
echo json_encode(['status' => 'ok', 'version' => '2027.1']);
|
|
} else {
|
|
http_response_code(404);
|
|
echo "404 Not Found";
|
|
}
|