多长时间会话变量最后,如果你不取消它?

编程入门 行业动态 更新时间:2024-10-28 21:21:35
本文介绍了多长时间会话变量最后,如果你不取消它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我一个变量保存在session中(PHP),多长时间会在该文件变量流连忘返?它会在那里,直到有人不设置变量或删除该文件?

When I store a variable in a session (in php), how long will that variable linger in that file? Will it be there until someone unsets the variable or deletes the file?

更新:所以它的 session.gc-maxlifetime 设置在php.ini文件中设定。你可以通过调用的phpinfo检查您的设置()。矿为1440秒钟,这样24分钟。 可能发现重复这里,虽然在谷歌上搜索我没有发现它在第一,因为措辞。

update: so it is session.gc-maxlifetime setting that is set in php.ini file. You can check your setting by calling phpinfo(). Mine is set to 1440 seconds so 24 minutes. Might have found a duplicate here, although when googling I didn't find it at first because of the wording.

推荐答案

在默认情况下它会在那里24分钟。 (这是默认的php.ini文件设置)。

On default it will be there 24 minutes. (Which is the default php.ini file setting).

当你评论说,这是设置:www.php/manual/en/session.configuration.php#ini.session.gc-maxlifetime

As you commented, this is the setting: www.php/manual/en/session.configuration.php#ini.session.gc-maxlifetime

更多推荐

多长时间会话变量最后,如果你不取消它?

本文发布于:2023-10-22 08:03:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1516929.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多长时间   变量   如果你不

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!