// echo "Please login first"; // exit(); // }); // Router::get('/hello/world', function () { // echo "hello world!"; // }); // Router::get('/admin/1', 'sample@admin'); // Router::set404('sample@notfound'); // Router::get('/(\w+)/(\w+)/.*', function ($controller, $action) { // echo $controller . ":" . $action; // }); // Router::run(function () { // echo "Successfully worked! "; // }); // Router::setByFile(__DIR__ . '/sample.ini'); Router::setByFile(__DIR__ . '/sample.json', 'json'); class sample { function auth() { echo "Please login first! "; exit; } function admin() { echo "You are accessing admin module! "; } function hello() { echo "Hello! "; }