starting shit oops forgot the db

This commit is contained in:
unknown 2019-11-03 00:53:48 -04:00
commit 9e17051db3
5 changed files with 328 additions and 0 deletions

19
index.php Normal file
View file

@ -0,0 +1,19 @@
<?php
require_once 'AltoRouter.php';
$router = new AltoRouter();
$router->addRoutes(array(
array('GET', 'story/[i:page]', 'pages/story.php', 'story'),
));
$router->setBasePath('/');
$match = $router->match(urldecode($_SERVER['REQUEST_URI']));
if ($match) {
foreach ($match['params'] as &$param) {
${key($match['params'])} = $param;
}
require_once $match['target'];
} else {
http_response_code(404);
exit('Page not found');
}