Skip to content

Instantly share code, notes, and snippets.

@volter9
Forked from Petah/index.php
Created October 18, 2015 20:55
Show Gist options
  • Save volter9/ea500f5dd50f5b2a3e07 to your computer and use it in GitHub Desktop.
Save volter9/ea500f5dd50f5b2a3e07 to your computer and use it in GitHub Desktop.
2-cms
<?php
$view = preg_replace('/[^a-z]/', '', $_SERVER['REQUEST_URI']) ?: 'index';
require __DIR__ . '/layout.php';
<html>
<body>
<?php require __DIR__ . '/views/' . $route . '.php'; ?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment