我有Laravel 5.0版本,只要用户键入任何不存在的路由,系统就会抛出以下异常消息。
Sorry, the page you are looking for could not be found.
1/1
NotFoundHttpException in compiled.php line 7959:
in compiled.php line 7959
at RouteCollection->match(object(Request)) in compiled.php line 7230
at Router->findRoute(object(Request)) in compiled.php line 7202
at Router->dispatchToRoute(object(Request)) in compiled.php line 7194
at Router->dispatch(object(Request)) in compiled.php line 2040
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9244
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Debugbar.php line 49
at Debugbar->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2548
at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 29
at VerifyCsrfToken->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12416
at ShareErrorsFromSession->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11106
at StartSession->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12118
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12066
at EncryptCookies->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2589
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in compiled.php line 9236
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in compiled.php line 9227
at Pipeline->then(object(Closure)) in compiled.php line 1996
at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 1983
at Kernel->handle(object(Request)) in index.php line 53
我已经检查了存储文件夹的权限,已经设置为0755.此外,我已经尝试了php artisan clear-compiled php artisan optimize php artisan cache:clear,但它仍然没有用。
仅当用户键入不存在的路由时才会发生此错误,对于route.php中已存在的其他路由,该网站工作正常。
我们非常感谢您解决问题的任何帮助。