Created
May 30, 2012 11:48
-
-
Save felixkiss/2835759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Require the Slim Framework | |
require('Slim/Slim.php'); | |
// Require the custom View | |
require_once('SlimViews/SmartyView.php'); | |
$app = new Slim(array( | |
'debug' => true, | |
'templates.path' => '../templates', | |
'view' => new SmartyView(), | |
'cookies.secret_key' => 'my_secret_key' | |
)); | |
// Set Routes | |
$app->get('/bar', function () use ($app) { | |
$app->redirect('/foo'); | |
}); | |
$app->get('/foo', function () { | |
echo "Foo!"; | |
}); | |
// Run Application | |
$app->run(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment