Session control
HTTP protocol, based on the TCP protocol.
HTTP protocol called Stateless protocol
SESSION COOKIE
Session features: 1. stored on the server. 2. Each user will generate a session. 3. There is a default expiration time of about 15 minutes. 4. Can store any type of data
Cookie features: 1. stored on the client. 2. Each user will generate one. 3. There is no expiration time by default. 4. Only strings can be stored
<body><? PHP Session_Start // turn on the use of Session//session//1. The page using session must be opened in the first line of the code $_session // assignment//echo $_session["UID"]; Value//cookie use setcookie// Assignment (set cookie)? ><a href= "huihuakongzhi1.php" > Jump </a></body>
View Code
<body><? PHP Session_Start (); Echo $_session ["UID"]; Echo $_cookie ["UID"]; // Take cookie value ?></body>
View CodePHP Session Control