php 缺少 Laravel 供应商/自动加载

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/46048519/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 03:10:43  来源:igfitidea点击:

Laravel vendor/autoload is missing

phplaravel

提问by Josel Parayno

I'm a beginner in laravel, so when I start creating my project using composer create-project laravel/laravel my-project-name 5.4.*

我是 Laravel 的初学者,所以当我开始使用 composer create-project laravel/laravel my-project-name 5.4.* 创建我的项目时

then i run it on my browser http://localhost:8080/test/public/and it shows me this error:

然后我在我的浏览器http://localhost:8080/test/public/上运行它,它显示了这个错误:

Warning: require(C:\xampp\htdocs\test\public/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\test\public\index.php on line 24

警告:require(C:\xampp\htdocs\test\public/../vendor/autoload.php):无法打开流:C:\xampp\htdocs\test\public\index.php 中没有这样的文件或目录在第 24 行

and

Fatal error: require(): Failed opening required 'C:\xampp\htdocs\test\public/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\test\public\index.php on line 24

致命错误:require(): Failed opening required 'C:\xampp\htdocs\test\public/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\xampp \htdocs\test\public\index.php 第 24 行

I've tried using composer install, update etc.. but nothing seems to happen.

我试过使用作曲家安装、更新等。但似乎什么也没发生。

回答by Sletheren

You'll solve your problem with running in the terminal inside your project

您将通过在项目内的终端中运行来解决问题

composer update

回答by ojikobeshi

Try using 'composer diagnose'.

尝试使用“作曲家诊断”。