您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
免费发信息

CI框架自动加载session出现报错的解决办法_PHP

2024/4/25 13:28:26发布4次查看
ci框架
很多程序员在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';//在这里加上密钥即可正常!
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录