session_commit
session_commit -- Alias of session_write_close()
Description
This function is an alias of session_write_close().
session_decode
(PHP 4 )
session_decode -- Decodes session data from a string
Description
bool session_decode ( string data)
session_decode() decodes the session data in data, setting
variables stored in the session.
See also session_encode().
session_destroy
(PHP 4 )
session_destroy -- Destroys all data registered to a session
Description
bool session_destroy ( void )
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.
Example 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();
?>
Example 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();
?>
|