【发布时间】:2018-03-08 18:56:17
【问题描述】:
我使用 slim 已经有一段时间了,今天我更新到 3.8,开箱即用我发现了一些东西
$app->get('/', function ($request, $response) {
return 'Slim working';
});
$app->get('/hello', function ($request, $response) {
return 'Slim hello also working';
});
第一个方法调用有效,第二个给我Object not found! 错误,我不明白出了什么问题,谁能帮我理解。
所以我的文件夹结构就像appname/public/index.php 我运行第一个方法只需调用appname/public/ 来运行第二个我像appname/public/hello 一样运行它
【问题讨论】:
-
如果能附上错误sn-p就好了。
-
appname/public/index.php/hello如果你没有重写 url