Skip to content

Instantly share code, notes, and snippets.

Created Oct 16, 2011
What would you like to do?
Zendcasts: SLIMming Out Your Controller
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
<title> Hello <?= $name; ?> </title>
margin: 0 0;
padding: 0 0;
font-family: helvetica, arial, sans-serif;
body {
background: #CCC;
padding: 20px;
margin: 0 auto;
width: 600px;
background: #FFF;
<div id="container">
Hello, <?= $name; ?>
require '../Slim/Slim.php';
$app = new Slim();
$app->get('/hello/:name', function($name)
include 'hello.tpl.php';
$app->get('/', function() {
echo "slim home! ";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment