laravel5.1-run PHP artisan serve times wrong

Source: Internet
Author: User
Tags autoload
    1. A sudden error occurred while running PHP artisan serve

Warning:invalid argument supplied for foreach () in D:\xampp\htdocs\baiduyun\vendor\composer\autoload_real.php on line 27Call 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:7fatal error:class ' dotenv ' not found in D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\ illuminate\foundation\bootstrap\detectenvironment.php on line 20Call 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

Reply content:

    1. When I ran PHP artisan serve, I suddenly got an error.

Warning:invalid argument supplied for foreach () in D:\xampp\htdocs\baiduyun\vendor\composer\autoload_real.php on line 27Call 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:7fatal error:class ' dotenv ' not found in D:\xampp\htdocs\baiduyun\vendor\laravel\framework\src\ illuminate\foundation\bootstrap\detectenvironment.php on line 20Call 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
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.