如何修复'ErrorException:chdir():无此类文件或目录(errno 2)'

时间:2019-05-02 08:07:48

标签: laravel-5

嗨,我在使用命令php artisan serve时遇到了问题。我使用xampp和laravel5。当我尝试运行php artisan serve时,出现此错误:

C:\xampp\htdocs\ClashProject\laravel>php artisan serve

   ErrorException  : chdir(): No such file or directory (errno 2)

  at C:\xampp\htdocs\ClashProject\laravel\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:42
    38|      * @throws \Exception
    39|      */
    40|     public function handle()
    41|     {
  > 42|         chdir(public_path());
    43|
    44|         $this->line("Laravel development server started: <http://{$this->host()}:{$this->port()}>");
    45|
    46|         passthru($this->serverCommand(), $status);

  Exception trace:

  1   chdir("C:\xampp\htdocs\ClashProject\laravel\public")
      C:\xampp\htdocs\ClashProject\laravel\vendor\laravel\framework\src\Illuminate\Foundation\Console\ServeCommand.php:42

  2   Illuminate\Foundation\Console\ServeCommand::handle()
      C:\xampp\htdocs\ClashProject\laravel\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php:32

  Please use the argument -v to see more details.

怎么了?

0 个答案:

没有答案