2012-06-17 08:58
浏览 44


Currently i am facing problem in codeigniter session size. some data doesn't save in session variable but i need this. i don't find any solution over googled. Here's my some session code. first i create session for login:

$this->session->set_userdata('member_loged', TRUE);
$this->session->set_userdata('uid', $uloged->id);
$this->session->set_userdata('user_name', $uloged->user_name);
$this->session->set_userdata('email', $uloged->email);

second session code for exam :

$onlineexam = array();

$ukey = time();
$uid = $this->session->userdata('uid');
$onlineexam['uid'] = $uid;
$onlineexam['examid'] = $eid;
$onlineexam['ukey'] = $ukey;
$onlineexam['onlineexamdate'] = date('Y-m-d H:i:s');

foreach($allque as $que):

$quid = $que['id'];
$qa['queid'] = $quid;  
$onlineexam['allq'][] = $qa;
$this->session->set_userdata('onlineexam', $onlineexam);


Third sesion add in online exam after click by ajax:

$onlineexam = $this->session->userdata('onlineexam');
$ans['queid'] = $queid; 
$ans['ansid'] = $ansid;
$ans['flag'] = $checkans;
$onlineexam['allanswer'][] = $ans;
$this->session->set_userdata('onlineexam', $onlineexam);

in allanswer variable fill with some data and miss maximum data

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanbo6482 2012-06-17 12:02

    Are you sessions stored in the cookie? If so, you are limited to 4kb. Switch to database sessions and you can store an endless about of information

    点赞 评论

相关推荐 更多相似问题