I can’t get Slim to give me a response for more than a couple of GET routes: Here’s my code:
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->config(array(
'templates.path' => './templates'
));
$app->get('/', function () use ($app) {
$app->render('landing.php');
});
$app->get('/about', function () use ($app) {
$app->render('about.php');
});
$app->get('/signup', function () use ($app) {
$app->render('signup.php');
});
$app->get('/dashboard', function () use ($app) {
$app->render('dashboard.php');
});
$app->run();
?>
It works fine when I run localhost:8888, Slim renders landing.php normally, if I type in localhost:8888/index.php/about it renders the about page, but as soon as I type in localhost:8888/index.php/signup or localhost:8888/index.php/dashboard it fails with a 404 error. Any help would be appreciated.
Just to clarify, I haven’t set up URL rewriting on my server (gave me other sorts of errors), and the files that I’m trying to render DO indeed exist.
I was editing the wrong file, sorry SO, my bad.