当我一个变量保存在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
更多推荐
多长时间会话变量最后,如果你不取消它?
发布评论