Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $app = new Slim();
- //routes here
- $app->get('/', 'home');
- $app->get('/hi/:first(/)', 'hi');
- $app->get('/test(/)', 'test');
- $app->run();
- //controllers here!
- function home(){
- global $config;
- $title = "Hello World";
- require $config->viewsPath . "header.php";
- require $config->viewsPath . "home.php";
- require $config->viewsPath . "footer.php";
- }
- function hi($first){
- echo "hi $first";
- }
- function test(){
- phpinfo();
- }
- ?>
Add Comment
Please, Sign In to add comment