Laravel中APP_KEY起什么作用
框架中是这样描述的:
This key is used by the Illuminate encrypter service and should be set to a random, 32 character string, otherwise these encrypted strings will not be safe. Please do this before deploying an application!
也就是这个key是一个随机字符串,用于实现框架中的encrypt(加密)服务,例如存储用户的session,cookie等,从而确保信息安全。可以通过artisan命令将该key更新。
在终端上执行:
php artisan key:generate
就可以获得新的APP_KEY了
还没有评论,来说两句吧...