PHP无法打开流,php artisan:“无法打开流:没有此类文件或目录”

I just started to learn php/laravel by following some guides and tutorials, which led me to run a server using php artisan serve command.

我采取的步骤如下:

install laravel using composer and adding it to $PATH.

creating a project by using laravel new new-blog

changing directory into the project foler and running php artisan serve command.

但是,而不是带有地址的php服务器的预期输出,我得到此错误:

PHP Warning: require(/home/sflash/Documents/php/laravel/new-blog/vendor/autoload.php): failed to open stream: No such file or directory in /home/sflash/Documents/php/laravel/new-blog/artisan on line 18

PHP Fatal error: require(): Failed opening required '/home/sflash/Documents/php/laravel/new-blog/vendor/autoload.php' (include_path='.:/usr/share/php') in /home/sflash/Documents/php/laravel/new-blog/artisan on line 18

我在linux机器上(debian破坏者)。我的项目文件夹的结构如下:

app composer.json package.json README.md server.php webpack.mix.js

artisan config phpunit.xml resources storage

bootstrap database public routes tests

As the error code above states, I don't have a file called vendor/autoload.php. How does this occur/how to fix this?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值