Session is stored on the server side, then each user's session will need to use the client's cookie, the server does not send cookies to the developer server, so the cookie-based session can not be used.
However, the same effect can be achieved as long as a unique session_id is set for each user.
Each person number is unique, so we can use the number as the user's session_id, or it can be MD5 encrypted after use.
Set Tousername to session_id as follows
$POSTSTR = $GLOBALS ["Http_raw_post_data"]; if (!empty ($POSTSTR)) { $msg = (array) simplexml_load_string ($postStr, ' simplexmlelement ', libxml_nocdata); $POSTSTR = $GLOBALS ["Http_raw_post_data"]; if (!empty ($POSTSTR)) { $msg = (array) simplexml_load_string ($postStr, ' simplexmlelement ', libxml_nocdata); Set session_id session_id ($msg [' tousername ']); Session_Start (); }
The above introduces the PHP public development platform How to use the session, including aspects of the content, I hope that the PHP tutorial interested in a friend to help.