当我使用“ php artisan serve”启动laravel时,它会将我定向到localhost:8000(并且有效)。但是,当我使用localhost:8000 / phpmyadmin打开phpmyadmin时,会引发错误。
RouteCollection.php第161行中的NotFoundHttpException:
in RouteCollection.php line 161
at RouteCollection->match(object(Request)) in Router.php line 821
at Router->findRoute(object(Request)) in Router.php line 691
at Router->dispatchToRoute(object(Request)) in Router.php line 675
at Router->dispatch(object(Request)) in Kernel.php line 246
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 44
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
at call_user_func(object(Closure), object(Request)) in Pipeline.php line 102
at Pipeline->then(object(Closure)) in Kernel.php line 132
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99
at Kernel->handle(object(Request)) in index.php line 53
at require_once('/var/www/html/cms/public/index.php') in server.php line 21
我尝试使用'php artisan serve --port 8888'更改端口号。 我正在使用xampp服务器。请帮忙!
答案 0 :(得分:0)
您可以将phpmyadmin文件夹放在公共文件夹中,并通过http://127.0.0.1:8000/phpmyadmin/index.php
进行访问但是,为什么不将其托管在xampp上并通过vhost文件配置端口呢?
答案 1 :(得分:0)
如果要访问phpmyadmin,必须通过链接http://localhost/phpmyadmin/index.php
的XAMPP服务器对其进行访问
然后php artisan serve
为仅laravel应用程序创建一个服务器端口localhost:8000
。
您必须知道这是laravel和您的XAMPP之间的两种不同类型
答案 2 :(得分:0)
您可以在config中尝试以下简单的两个步骤。
启用rewrite_module,并在2)行中禁止任何操作
1)只需删除此行中的##LoadModule rewrite_module modules / mod_rewrite.so
2)将“ AllowOverride None”替换为“ AllowOverride All”
您还可以在artisan服务器中使用以下简单方法进行指定。
php artisan serve --port=8888
答案 3 :(得分:0)
您始终可以在没有端口的情况下访问phpmyadmin, 并确保输入小写字母。