首页 > php框架 > ci框架自动加载session报错问题解决办法

ci框架自动加载session报错问题解决办法

在ci中使用session的时候,开启自动加载session之后网站就报错了,报错如下In order to use the Session class you are required to set an encryption key 下面一起来看问题解决办法。

提示你如果想用session类的话就必须要设置一个加密的密钥!好吧,好吧。。那就给设置一个吧,毕竟人家也为安全着想

打开application/config/config.php

<?php
/*
|--------------------------------------------------------------------------
| 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'] = '在这里加上密钥即可正常!';


永久链接:http://www.phprm.com/frame/61455.html

转载随意!带上文章地址吧。

标签:none

发表留言