I am just starting to work with Slim PHP. What could be the reason that get is not recognized on server?
This route works: it returns required text https://mywebsite/back/public
This route doesn't work (Not Found
): https://mywebsite/back/public/countries
I have just installed slim framework and added new index.php
file.
<?php
require '../vendor/autoload.php';
$app = new SlimApp();
$app->get('/', function($request, $response, $arg) {
$response->write("This route works");
});
$app->get('/countries', function($request, $response, $arg) {
$response->write("This route doesnt");
});
$app->run();
?>
question from:
https://stackoverflow.com/questions/65893167/slim-php-not-recognizing-gets 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…