Skip to content

Instantly share code, notes, and snippets.

@galihazizif
Created November 8, 2017 02:58
Show Gist options
  • Save galihazizif/e0d9a92407eff6acc0edfadc5a33eb1d to your computer and use it in GitHub Desktop.
Save galihazizif/e0d9a92407eff6acc0edfadc5a33eb1d to your computer and use it in GitHub Desktop.
bukutamu/index.php
<?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