关于本地larvael项目部署到服务器报错Whoops, looks like something went wrong.的问题

关于本地larvael项目部署到服务器报错Whoops, looks like something went wrong.的问题

Ezra
2021-03-09 / 16 评论 / 1,309 阅读 / 正在检测是否收录...

在本地写完测试好的laravel项目,上传至服务器就出现了这个问题"Whoops, looks like something went wrong.",但是即便如此我们并不知道哪里发生了错误所以第一步

  1. 把config/app.php文件内'debug' => env('APP_DEBUG', false),改成'debug' => env('APP_DEBUG', true)
    接下啦会发现更多更详细的报错信息:No application encryption key has been specified.
  2. 接下来使用php artisan key:generate命令生成key
    用这个功能可能会报[ErrorException] putenv() has been disabled for security reasons的错,这是因为宝塔面板禁用了改函数所以报错
  3. 打开宝塔面板
    打开软件商店找到对应的php版本将禁用函数putenv()删除就可以了
0

评论 (16)

取消
  1. 头像
    hmsvucgxls
    Windows 10 · Google Chrome

    博主真是太厉害了!!!

    回复
  2. 头像
    wissskonnn
    Windows 10 · Google Chrome

    叼茂SEObfbikes.com

    回复
  3. 头像
    xepeziprbd
    Windows 10 · Google Chrome

    叼茂SEO.bfbikes.com

    回复
  4. 头像
    vsatbcjfuv
    Windows 10 · Google Chrome

    不错不错,我喜欢看

    回复
  5. 头像
    cdnablvfyz
    Windows 10 · Google Chrome

    看的我热血沸腾啊

    回复
  6. 头像
    ylskkkkonf
    Windows 10 · Google Chrome

    叼茂SEO.bfbikes.com

    回复
  7. 头像
    bkmxssvtey
    Windows 10 · Google Chrome

    怎么收藏这篇文章?

    回复
  8. 头像
    coythocrai
    Windows 10 · Google Chrome

    看的我热血沸腾啊https://www.237fa.com/

    回复
  9. 头像
    iqxvpunzix
    Windows 10 · Google Chrome

    想想你的文章写的特别好https://www.ea55.com/

    回复
  10. 头像
    elapbqxrah
    Windows 10 · Google Chrome

    看的我热血沸腾啊https://www.ea55.com/

    回复
  11. 头像
    vkcyhjltjy
    Windows 10 · Google Chrome

    你的文章充满了创意,真是让人惊喜。http://www.chapelandoak.com

    回复
  12. 头像
    iwaarcrdft
    Windows 10 · Google Chrome

    你的文章让我学到了很多知识,非常感谢。http://www.tjpadp.com

    回复
  13. 头像
    uasfufvrgd
    Windows 10 · Google Chrome

    不错不错,我喜欢看 www.jiwenlaw.com

    回复
  14. 头像
    zgxubjefiy
    Windows 10 · Google Chrome

    你的文章充满了智慧,让人敬佩。http://www.weifangaoda.com

    回复
  15. 头像
    nuelkibcxh
    Windows 10 · Google Chrome

    哈哈哈,写的太好了https://www.cscnn.com/

    回复
  16. 头像
    ehjsfrltox
    Windows 10 · Google Chrome

    文章的确不错啊https://www.cscnn.com/

    回复