【发布时间】:2018-02-13 08:50:55
【问题描述】:
我是 laravel 的初学者,所以当我开始使用 composer create-project laravel/laravel my-project-name 5.4.* 创建我的项目时
然后我在浏览器http://localhost:8080/test/public/ 上运行它,它显示了这个错误:
警告:需要(C:\xampp\htdocs\test\public/../vendor/autoload.php): 无法打开流:中没有这样的文件或目录 C:\xampp\htdocs\test\public\index.php 第 24 行
和
致命错误:require():需要打开失败 'C:\xampp\htdocs\test\public/../vendor/autoload.php' (include_path='C:\xampp\php\PEAR') 在 C:\xampp\htdocs\test\public\index.php 第 24 行
我尝试过使用 composer install、update 等。但似乎没有任何反应。
【问题讨论】:
-
你编辑过
public\index.php吗? -
我应该怎么知道? @noufalcep
-
@AndriyLozynskiy 我没有
-
@JoselParayno
require __DIR__.'/../bootstrap/autoload.php';请检查此行是否在您的index.php中?