开发者

Which function will be used to destroy the pre define session variable after a certain time?

开发者 https://www.devze.com 2023-02-19 14:50 出处:网络
In CodeIgniter, which function will be used to destroy the pre define sessio开发者_开发技巧n variable(id, username) after specified time i.e. 20sec?Ther is no specific function for that, but in ci/roo

In CodeIgniter, which function will be used to destroy the pre define sessio开发者_开发技巧n variable(id, username) after specified time i.e. 20sec?


Ther is no specific function for that, but in ci/root/application/config/config.php around line 244 $config['sess_expiration'] = 7200; this sets your session length. Please notice that codegniter sessions are stored in cookies.

If you want to destroy a session after n seconds i recommend you to use something else, like:

  • Memcached
  • ini_set("session.gc_maxlifetime", SESSION_LIFETIME_IN_SECONDS)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号