PHP 忒聊
綴豖
ヶ輛
session_destroy
(PHP 4)
Description
session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie.
This function returns TRUE on success and FALSE on failure to destroy the session data.
瞰赽 1. Destroying a session
?php // Initialize the session. // If you are using session_name("something"), don't forget it now! session_start(); // Unset all of the session variables. session_unset(); // Finally, destroy the session. session_destroy();?
瞰赽 2. Destroying a session with $_SESSION
?php // Initialize the session. // If you are using session_name("something"), don't forget it now! session_start(); // Unset all of the session variables. $_SESSION = array(); // Finally, destroy the session. session_destroy();?
綴豖
れ萸
ヶ輛
session_decode
奻珨撰
session_encode