且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自动登录后,不会保存$ _SESSION变量

更新时间:2023-12-04 10:30:40

尝试这样的注销功能

function logout(){

function logout() {

   session_start();
   session_destroy();

}

  1. 调用注销函数时,它不会调用session_start(),因此无法获取会话变量.应在编辑之前先获取它.

  1. When you call the logout function,it doesn't call the session_start(),so you can't get the the session variables.You should get it before you will edit it.

详细信息: php.net session_destory()