首页 > 其他 > 详细

CodeIgniter 错误: In order to use the Session class you are required to set an encryption key

时间:2014-06-05 01:13:59      阅读:368      评论:0      收藏:0      [点我收藏+]

第一次使用session,需要:

$this->load->library(‘session‘);

的同时,还需要修改配置文件:config.php 找到 $config[‘encryption_key‘] = ‘’

将$config[‘encryption_key‘] 的内容随便设置,就可以用了。

附录:

1.添加session内容:

$this->session->set_userdata(‘user_name‘, $userinfo[‘user_name‘]);

2.获取session内容:

$name= $this->session->userdata(‘user_name‘);

CodeIgniter 错误: In order to use the Session class you are required to set an encryption key,布布扣,bubuko.com

CodeIgniter 错误: In order to use the Session class you are required to set an encryption key

原文:http://blog.csdn.net/xyw_blog/article/details/27106765

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!