session_unset()
Release all $_SESSION variables currently created in memory, but do not delete the session file and do not release the corresponding session
id
session_destroy()
Delete the current user corresponding session file and release the session
id, the content of the $_SESSION variable in the memory is still retained
. Therefore, to release all the resources of the user's session, the following code needs to be executed in sequence:
Copy code The code is as follows:
$_SESSION['user'] = 'lowell';
session_unset();
session_destroy();
?>
http://www.bkjia.com/PHPjc/323685.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323685.htmlTechArticlesession_unset() releases all $_SESSION variables currently created in memory, but does not delete the session file and does not release The corresponding session id session_destroy() deletes the corresponding session id of the current user...
Statement: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