如何使用户会话继续进行24小时? [英] How to make user session go on for 24 hours?
本文介绍了如何使用户会话继续进行24小时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经与我的Apache和php.ini文件和我的网站的用户搞砸周围仍然抱怨该网站在很短的时间或每次关闭和打开浏览器相同时间后记录出来。
I have messed around with my apache and php.ini file and my site's users still complain about the site logging them out after a very short time or every time they close and open the same browser.
我运行的Apache和PHP。
I am running Apache and PHP.
我应该为了让24小时的用户会话去什么设置,使他们不必再每次登录的时候?
What settings should I have in order to make the users session go for 24 hours so they don't have to re-log in every time?
谢谢,
亚历克斯
Thanks, Alex
推荐答案
在php.ini中,设置:
In php.ini, set:
; 24 hour session cookie
session.cookie_lifetime = 86400
; Prevent server from cleaning up session
; Some value higher than the cookie lifetime
session.gc_maxlifetime = 200000
这篇关于如何使用户会话继续进行24小时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文