Summary Files Commits Branches @commit @diff @stats
path: root / src / index.php
blob: 26089e9988bcddc17f0aa7d4a171524a80b381d1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php require "document-top.php"; ?>

<?php
include_once("controllers/LandingController.php");

/* The landing page practically acts as our page router 
 * Thanks https://www.taniarascia.com/the-simplest-php-router/
 */

$landingController = new LandingController();

$request = $_SERVER['REQUEST_URI'];

switch ($request) {
	case "":
	case "/":
		$landingController->invoke();
		break;
	default:
		http_response_code(404);
		break;
}
?>

<?php require "document-bot.php"; ?>