Home > Backend Development > PHP Tutorial > session的生命周期是多长_PHP

session的生命周期是多长_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 12:32:40
Original
862 people have browsed it

session 的生命周期是多长 1 浏览器结束时其生命周期也同时结束,但是档案仍然存在于 /tmp/(sess_???)
2 下次重新开浏览器时会重新分配 sessionID,如果你使用 session_id() 把以前的 ID 带回来,则会去读取残存在 /tmp 处的 sess_???, 取回你之前所有已经设定的参数
3 可以在 php.ini 里修改 session 档案残存的时间

session.gc_maxlifetime = 1440 ; after this number of seconds, stored
; data will be seen as \'garbage\' and
; cleaned up by the gc process

默认是 1440 秒,24分钟
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template