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 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号