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.
我想在用户注销到登录前的会话 ID 后恢复会话 ID。我在用户登录时存储会话 ID,但我不知道必须在用户浏览器上存储的 cookie 中更改它。
我怎样才能改变它?
//before loggin $_SESSION['old_session'] = $_SESSION; //During logout $old_session = $_SESSION['old_session']; session_destroy(); $_SESSION = $old_session;