Answer the question
In order to leave comments, you need to log in
Slim: how to create routes in different subdirectories?
I apologize in advance for the chaotic question, I don’t even quite understand how to formulate it normally, but I’ll try ...
There is a root directory with index.php and the code:
require 'libs/Slim/Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->config('debug', true);
$app->get('/users/:one', function ($one) {
echo "The first parameter is " . $one;
});
$app->run();
Answer the question
In order to leave comments, you need to log in
If I understand correctly, then you have the following structure:
/app/slim/...
/app/index.php
/app/test/index.php
/app/.htaccess
If yes, then you most likely need to look at .htaccess and the problem in it because it probably does not allow to reach test.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question