Correct logoff of PHP SESSION, logoff phpsession
/*1, each page must be opened session_start () to use the session in each page. 2, Session_Start () initialization session, the first access will generate a unique session ID is saved on the client (is based on cookie), the next time the user accesses, Session_Start () will check that there is no session ID, If there is a browser with this session ID (sent through the sending header file, which can be seen in the FF browser) to determine the client. 3, the session to the cookie will be stored in the client a conversation ID is session_id, this can be seen by printing a cookie, the session_id key value is session_name,session_id () = = $_ Cookie[session_name ()]4, if the client has disabled cookies, the URL must be passed session_id that the URL is given SESSION5, logoff session cannot use Unset ($_session), you can use $_ Session = Array () or $_session = null, the correct way to unregister the session is as follows: *///correct logoff session method://1 open Sessionsession_start ();//2, Empty SESSION Information $_session = Array ();//3, clear Client Sessionidif (Isset ($_cookie[session_name ())) { Setcookie (session_name (), ", Time ()-3600, '/');} 4. Complete destruction of Sessionsession_destroy ();
http://www.bkjia.com/PHPjc/983247.html www.bkjia.com true http://www.bkjia.com/PHPjc/983247.html techarticle The correct logoff php session, logoff phpsession/*1, each page must be open session_start () to use the SESSION in each page. 2, Session_Start () initialization session, first ...