Skip to content

Instantly share code, notes, and snippets.

@felixkiss
Created May 30, 2012 11:48
Show Gist options
  • Save felixkiss/2835759 to your computer and use it in GitHub Desktop.
Save felixkiss/2835759 to your computer and use it in GitHub Desktop.
<?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