duanliao3826 2011-10-02 15:54
浏览 78
已采纳

会话在CodeIgniter中过期

In CodeIgniter config.php file,we can set session expire time in seconds $config['sess_expiration'] = 300;. Now I have two part for my web site,user part and admin part.I need user session expires after 10 minutes(600sec) and admin session expires after 5 minutes(300sec) . Is there any easy way to do it?

  • 写回答

1条回答 默认 最新

  • doufan9805 2011-10-02 16:06
    关注

    I think the easiest is to replace the current CI_Session instance within your admin with a new instance having those options passed in the $params array in the constructor.

    The other variant would be that you extend the CI_Session class with your own variant which offers a method to change expiration time or can deal with a second config item which it's processes conditionally.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 github训练的模型参数无法下载
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题
  • ¥50 求图像处理的matlab方案
  • ¥50 winform中使用edge的Kiosk模式
  • ¥15 关于#python#的问题:功能监听网页
  • ¥15 怎么让wx群机器人发送音乐