Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这更像是一个概念问题。但我想知道使用 PHP 时网络会话何时开始和结束。我很确定会话在用户第一次请求任何具有 session_start() 函数的页面时开始。但是,当用户导航到同一选项卡中的另一个页面时,会话是否结束?是否在同一浏览器的多个选项卡和窗口中保留了相同的会话?要在浏览器关闭后保留会话,是否必须使用 cookie?
session_start()
session.gc_maxlifetime
session.cookie_lifetime
参考