Skip to content

Instantly share code, notes, and snippets.

@KamilaBorowska
Created September 17, 2012 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KamilaBorowska/3737998 to your computer and use it in GitHub Desktop.
Save KamilaBorowska/3737998 to your computer and use it in GitHub Desktop.
Best PHP framework which makes PHP sort of... useless... I guess?
<?php
require 'off-rails.php';
get('/', 'index');
function index() {
echo 'Hello, world!';
}
get('/old-main', 'redir_to_main');
function redir_to_main() {
redirect('/');
}
whatever('/*', 'error404');
function error404($page) {
give(404);
echo "I'm sorry, but $page doesn't exist (also XSS!).";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment