首页 > 后端开发 > php教程 > laravel5.1 - 运行php artisan serve时报错

laravel5.1 - 运行php artisan serve时报错

WBOY
发布: 2016-06-06 20:20:16
原创
2337 人浏览过

  1. 运行php artisan serve时突然就报错了

<code>Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\baiduyun\vendor\composer\autoload_real.php on line 27

Call Stack:
    0.0012     120376   1. {main}() D:\xampp\htdocs\baiduyun\artisan:0
    0.0016     122520   2. require('D:\xampp\htdocs\baiduyun\bootstrap\autoload.php') D:\xampp\htdocs\baiduyun\artisan:16
    0.0021     123824   3. require('D:\xampp\htdocs\baiduyun\vendor\autoload.php') D:\xampp\htdocs\baiduyun\bootstrap\autoload.php:17
    0.0027     133680   4. ComposerAutoloaderInitaf5083d097d55e814d46f33a1de9d74d::getLoader() D:\xampp\htdocs\baiduyun\vendor\autoload.php:7


Fatal error: Class 'Dotenv' not found in D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\DetectEnvironment.php on line 20

Call Stack:
    0.0012     120376   1. {main}() D:\xampp\htdocs\baiduyun\artisan:0
    0.1532    1670160   2. Illuminate\Foundation\Console\Kernel->handle() D:\xampp\htdocs\baiduyun\artisan:36
    0.1532    1670224   3. Illuminate\Foundation\Console\Kernel->bootstrap() D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:105
    0.1535    1670312   4. Illuminate\Foundation\Application->bootstrapWith() D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:208
    0.1598    1675184   5. Illuminate\Foundation\Bootstrap\DetectEnvironment->bootstrap() D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:203
</code>
登录后复制
登录后复制

回复内容:

  1. 运行php artisan serve时突然就报错了

<code>Warning: Invalid argument supplied for foreach() in D:\xampp\htdocs\baiduyun\vendor\composer\autoload_real.php on line 27

Call Stack:
    0.0012     120376   1. {main}() D:\xampp\htdocs\baiduyun\artisan:0
    0.0016     122520   2. require('D:\xampp\htdocs\baiduyun\bootstrap\autoload.php') D:\xampp\htdocs\baiduyun\artisan:16
    0.0021     123824   3. require('D:\xampp\htdocs\baiduyun\vendor\autoload.php') D:\xampp\htdocs\baiduyun\bootstrap\autoload.php:17
    0.0027     133680   4. ComposerAutoloaderInitaf5083d097d55e814d46f33a1de9d74d::getLoader() D:\xampp\htdocs\baiduyun\vendor\autoload.php:7


Fatal error: Class 'Dotenv' not found in D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\DetectEnvironment.php on line 20

Call Stack:
    0.0012     120376   1. {main}() D:\xampp\htdocs\baiduyun\artisan:0
    0.1532    1670160   2. Illuminate\Foundation\Console\Kernel->handle() D:\xampp\htdocs\baiduyun\artisan:36
    0.1532    1670224   3. Illuminate\Foundation\Console\Kernel->bootstrap() D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:105
    0.1535    1670312   4. Illuminate\Foundation\Application->bootstrapWith() D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php:208
    0.1598    1675184   5. Illuminate\Foundation\Bootstrap\DetectEnvironment->bootstrap() D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:203
</code>
登录后复制
登录后复制
相关标签:
php
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板