zoukankan      html  css  js  c++  java
  • laravel框架使用中错误及解决办法总结

    1.Laravel访问出错错误信息:`Warning: require(/vendor/autoload.php):failed to open stream: No such file or dire

    错误信息:`Warning: require(/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php):

    failed to open stream: No such file or directory in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17

    Fatal error: require():

    Failed opening required ‘/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php’

    (include_path=’.:/usr/local/lib/php’) in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17`

    原因:网站根目录下缺少vendor这个存放laraver依赖包的目录
    解决方法:使用composer install进行安装(没有安装过的情况下,以前安装过的话使用:composer update) ,如图:

    如果没有安装过,直接使用了composer update命令,就会报错。

    然后就可以访问网站了。


    2.Laravel 出现"RuntimeException inEncrypter.php line 43:

    The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths."

    问题的解决办法

    首先在cmd命令行下定位到项目所在的根目录下,接着输入:

    php artisan key:generate

    效果:

    这时候项目根目录下的.env文件里的APP_KEY应该会有值了:

    若没有,则将上一步生成的key值输入进去即可。

  • 相关阅读:
    sqlalchemy 基本操作
    Codeforces 716A Crazy Computer
    Codeforces 719B Anatoly and Cockroaches
    POJ 1067 取石子游戏
    P1028 数的计算
    P1914 一串字母
    P1308 统计单词数
    P1200 你的飞碟在这儿
    P1055 书号
    P1567 气温统计
  • 原文地址:https://www.cnblogs.com/zmdComeOn/p/10388778.html
Copyright © 2011-2022 走看看