1. Session can save any type of data. Because it is stored on the server (that is, it has been serialized).
2. Session Operation mechanism
Session_Start (); The session has been opened, which is equivalent to reading the session information
$_session[' favcolor '] = ' green ';
$_session[' animal ' = ' cat ';
$_session[' time ' = time ();
Works If session cookie was accepted
Echo '
Page 2 ';
page2.php
echo $_session[' Favcolor ']; Green
echo $_session[' animal ']; Cat
echo Date (' Y m D h:i:s ', $_session[' time ');
Session_Start declares the $_session variable, writes the data in the $_session to the data space, and releases the variable for the operation $_session variable, $_session assignment.
Delete $_session cannot be unset, you can set it to null: $_session = Array ();
Delete the current $_session data file Session_destory () under C:windos/temp under the default system path. The directory can be found in the browser
Remove SessionID by using cookie technology within the browser
Setcookie (' Phpsessid ', Time ()-1);
All three can be used together to completely delete a session
3. There may be inconsistencies in the cycle.
http://www.bkjia.com/PHPjc/477496.html www.bkjia.com true http://www.bkjia.com/PHPjc/477496.html techarticle 1. Session can save any type of data. Because it is stored on the server (that is, it has been serialized). 2. Session running mechanism session_start (); Has opened the session, the equivalent of ...