首页 > 解决方案 > 克隆 Laravel 项目后,我有 500 错误

问题描述

我正在做我的项目(我在 github 上有那个)。我克隆了这个项目,在我尝试打开它(php artisan serv)后,我遇到了错误 500。我尝试创建一个新项目,它可以正常工作。我发现可以生成新密钥

php artisan key:generate

但我有这个错误

file_get_contents(/home/michal/ogloszenia/.env): failed to open stream: No such file or directory

  at vendor/laravel/framework/src/Illuminate/Foundation/Console/KeyGenerateCommand.php:96
     92|     {
     93|         file_put_contents($this->laravel->environmentFilePath(), preg_replace(
     94|             $this->keyReplacementPattern(),
     95|             'APP_KEY='.$key,
  >  96|             file_get_contents($this->laravel->environmentFilePath())
     97|         ));
     98|     }
     99| 
    100|     /**

      +17 vendor frames 
  18  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

我该如何解决我的问题?

标签: phpmysqllaravel

解决方案


推荐阅读