本文介绍了流明安装错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用composer安装流明,所以我使用了下面的命令
I am trying to install lumen with composer so I used the command below
composer create-project --prefer-dist laravel/lumen api
但是,由于某些原因,我什至在访问公用文件夹之前,甚至在执行任何操作之前都会收到此错误.
But, for some reason I am getting this error before even doing anything, just visiting the public folder.
Sorry, the page you are looking for could not be found.
1/1
NotFoundHttpException in RoutesRequests.php line 442:
in RoutesRequests.php line 442
at Application->handleDispatcherResponse(array('0')) in RoutesRequests.php line 381
at Application->Laravel\Lumen\Concerns{closure}() in RoutesRequests.php line 624
at Application->sendThroughPipeline(array(), object(Closure)) in RoutesRequests.php line 382
at Application->dispatch(null) in RoutesRequests.php line 327
at Application->run() in index.php line 28
推荐答案
假定您正在从public/index.php更改的子目录中运行流明:
Assuming you are running lumen from a subdirectory, in public/index.php change:
$app->run();
到
$request = Illuminate\Http\Request::capture();
$app->run($request);
那对我有用.
这篇关于流明安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!