开发者

set expire time for a session

I have a login page that uses session variables. How can i set an expire time for a session? eg: after 15 minutes of inactivity destroy th开发者_StackOverflowe session.

how can i do it?


You must set a variable in your session object with the time in every page it accesses, and in that all pages you will calculate if the current time have a difference from the last time setted of 15 minutes or more, if so you invalidate the session...

if not, you set a new time to that variable..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜