moving to public_html for exec

pull/10/head
Vivien DUFOUR 2 years ago
parent 1e28945183
commit d34907aeac

@ -13,8 +13,9 @@ $router->map("GET", "/", fn() => $helloController->display());
$match = $router->match(); $match = $router->match();
if ($match == null) { if (!$match) {
// TODO redirect to a 404 not found page instead (issue #1) $error = "error404";
require_once 'src/View/error.php';
header('HTTP/1.1 404 Not Found'); header('HTTP/1.1 404 Not Found');
exit(1); exit(1);
} }

@ -0,0 +1,18 @@
<html lang="fr">
<head>
<title>Error</title>
</head>
<body>
<?php
if (isset($error)) {
if($error == "error404"){
echo "<h1>Error 404</h1>";
echo "<p>Page not found</p>";
}
}
?>
</body>
</html>
Loading…
Cancel
Save