PHP会话默认超时 [英] PHP sessions default timeout

查看:70
本文介绍了PHP会话默认超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,PHP会话是否超时?也就是说,如果我没有任何编码,最终会在一段时间不活动之后最终注销"用户吗?

Do PHP sessions timeout by default - ie without any coding on my part would a user eventually be "logged out" after some time of inactivity?

推荐答案

这取决于服务器配置或相关指令

It depends on the server configuration or the relevant directives session.gc_maxlifetime in php.ini.

通常情况下,默认值为24分钟(1440秒),但是您的虚拟主机可能已将默认值更改为其他值.

Typically the default is 24 minutes (1440 seconds), but your webhost may have altered the default to something else.

这篇关于PHP会话默认超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆