Created
November 8, 2017 02:58
-
-
Save galihazizif/e0d9a92407eff6acc0edfadc5a33eb1d to your computer and use it in GitHub Desktop.
bukutamu/index.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include __DIR__.'/config.php'; | |
$page = !empty($_GET['page'])?$_GET['page']:null; | |
try{ | |
include __DIR__.'/layout/header.php'; | |
switch ($page) { | |
case 'home': | |
include __DIR__.'/page/home.php'; | |
break; | |
case 'form': | |
include __DIR__.'/page/form.php'; | |
break; | |
default: | |
include __DIR__.'/page/home.php'; | |
break; | |
} | |
include __DIR__.'/layout/footer.php'; | |
}catch(\Exception $e){ | |
echo $e->getMessage(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment