session_start -start new or resume existing session
Session_Start ();
Print_r ($_session);
See if there is a session object, look at the request head has phpsessid the key = = value of the cookie is not, there is the ID, see if you can find the corresponding ID of the session object
Typically, the server has accepted to PHPSESSID, then the session exists
The request header does not have a cookie that phpsessid the key = value, stating that the server does not have a Session object, creates a session object (and writes the key = = value pair in the Set-cookei of the response header, Notify the browser to save the session ID locally, the next time in the same session to enter the page will not create a new Session object,
Can not manually delete the session object in the browser saved PHPSESSID (assuming can be manually deleted, it would like to create a very large number of server $_session Hyper-Global array, the server certainly does not allow, you want to session_start () Before deleting PHPSESSID, the same session, the next time you enter will create a new session object,
Setcookie (Phpsessid, "", Time ()-100);
Session_Start ();
No, PHPSESSID. Only the server can delete itself, so that the ability to ensure the uniqueness of the $_session variable in a process
The logic of Session_Start ()