doukou4066 2013-06-15 00:17
浏览 51

Jquery和codeigniter会话

I've looked around, but I can't seem to find a solution.

I have a drop down menu in my html and when you select one of the option it redirects to a different url in my jquery.

like this

$('#chapter').change(function(){
  var chapter = $(this).val();
  $(location).attr('href','http://www.writeyourfiction.com/story/readStory/'+chapter);
}); 

This all works fine, but my issue is when that redirect happens codeigniter seems to be dropping my sessions. I've var_dumped my sessions before the redirect and they are there, but when I ver_dump them again after the redirect the sessions are empty.

Any help would be amazing!

  • 写回答

2条回答 默认 最新

  • dpvmjk0479 2013-06-15 00:33
    关注

    I think so the session class must either be initialized in your controller constructors,by use the $this->load->library('session'); function, Or If sessions data does not exist (or if it has expired) a new session will be created and saved in the cookie.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料