Laravel框架运行出错提示RuntimeException No application encryption key has been specified
本文实例讲述了laravel框架运行出错提示runtimeexception no application encryption key has been specified.解决方法。分享给大家供大家参考,具体如下:①在项目根目录放置.env文件.env
app_name=laravel
app_env=local
app_key=
app_debug=true
app_log_level=debug
app_url=http://localhost
db_connection=mysql
db_host=127.0.0.1
db_port=3306
db_database=homestead
db_username=homestead
db_password=secret
broadcast_driver=log
cache_driver=file
session_driver=file
session_lifetime=120
queue_driver=sync
redis_host=127.0.0.1
redis_password=null
redis_port=6379
mail_driver=smtp
mail_host=smtp.mailtrap.io
mail_port=2525
mail_username=null
mail_password=null
mail_encryption=null
pusher_app_id=
pusher_app_key=
pusher_app_secret=
②在项目目录下运行:
php artisan key:generate
该命令会生成app_key并写入到.env文件中,重新运行
希望本文所述对大家基于laravel框架的php程序设计有所帮助。
原文链接:https://blog.csdn.net/qq_39479575/article/details/78495703
文档来源:http://www.zzvips.com/article/179694.html
页:
[1]