黑松山资源网 Design By www.paidiu.com

很多程序员在CI中使用session的时候,开启自动加载session之后网站就报错了,具体错误信息如下:In order to use the Session class you are required to set an encryption key

下面一起来看问题解决办法。

提示信息说明:如果想用session类的话就必须要设置一个加密的密钥!那就给设置一个吧,毕竟也是出于安全考虑。

打开application/config/config.php找到Encryption Key

复制代码 代码如下:
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------

| If you use the Encryption class or the Session class you
| MUST set an encryption key.  See the user guide for info.

*/
$config['encryption_key'] = 'xxxxx';//在这里加上密钥即可正常!

黑松山资源网 Design By www.paidiu.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
黑松山资源网 Design By www.paidiu.com