The use of the session in PHP is relatively simple, through Session_Start (), start the sesssion session function (you can also set the PHP configuration file Session.auto_start =1 so that you do not need to call session_start (), The session can be used directly, and the statement must precede all output statements in the script (if you are using cookie-based sessions in the PHP manual, you must call Session_Start () before Anything is outputted to the browser.).
You can then manipulate the $_session array just as you would with an array, such as $_session[' something ']= ' nothing '. You can complete settings and modifications.
As for the early destruction session, use the Session_unset () function to destroy the session record of the conversation.
For a more detailed understanding of the session mechanism in PHP, see www.cnblogs.com/acpp/archive/2011/06/10/2077592.html
Use of Session in PHP