Is this a proper way to destroy all session data in php?

后端 未结 9 599
耶瑟儿~
耶瑟儿~ 2020-11-27 18:21

Got it from php.net, but I am not sure is this how everybody destroy all sessions?

// Unset all Sessions
$_SESSION = array();

if (isset($_COOKIE[session_nam         


        
9条回答
  •  萌比男神i
    2020-11-27 18:55

    This only destroys the current users session, not all the other users session.

    Try using the session_save_path() to find out where the session data is being stored, and then delete all the files there.

提交回复
热议问题