Laravel ErrorException无此类文件或目录
我已经通过putty终端将我的Laravel项目上传到ubuntu服务器上。 Composer安装在服务器计算机上,但当我运行任何artisan命令时,它会给出一个错误Laravel ErrorException无此类文件或目录,laravel,ubuntu,putty,Laravel,Ubuntu,Putty,我已经通过putty终端将我的Laravel项目上传到ubuntu服务器上。 Composer安装在服务器计算机上,但当我运行任何artisan命令时,它会给出一个错误 $ php artisan serve ErrorException require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php): failed to open stream: No such file or directory
$ php artisan serve
ErrorException
require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php): failed to open stream: No such file or directory
api.php
已经存在,但是我不知道为什么会出现这个错误。尝试了谷歌的所有解决方案。问题:您可能已经更改了某些内容,例如文件的名称或路径 解决方案:
首先,使用以下命令清除所有配置
$ php artisan config:clear
然后,再次运行以下命令
$ php artisan serve
更新(2021/01/07):
您得到了以下错误:
ErrorException require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php): failed to open stream: No such file or directory at vendor/laravel/framework/src/Illuminate/Routing/RouteFileRegistrar.php:35 31
这个库似乎没有完全安装好。应使用以下命令更新库:
$ composer update
$ php artisan serve
然后,再次运行以下命令:
$ composer update
$ php artisan serve
拼写没问题(例如,该路径的某些部分是大写还是小写,可能
api
或v1
必须大写)?@Prathamesh您是否尝试过php artisan配置:clear
?@Th–nLƠƠNG尝试了所有artisan命令,但都不起作用,项目在我的windows系统上运行得很好,但尝试了一个错误,ErrorException require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php):无法打开流:在vendor/laravel/framework/src/illighte/Routing/RouteFileRegistrar.php:35 31没有这样的文件或目录▕ 公共功能登记册($routes)32▕ { 33▕ $路由器=$this->router;34▕ ➜ 35▕ 需要$路线;36▕ } 37▕ }我更新了我的帖子。