Php5 and mysql5web development technology-10php session management php5 and mysql5web development technology-10 p. Session management is an important part of web development, including Session and Cookie Technologies. 1. Cookie working principle setcookie () 2. Cookie application development can only read from a single domain in the same domain, not hypersession management is an important part of web development, including Session and Cookie Technologies.
1. how cookies work
Setcookie ()
2. Cookie application development
Read only the domain
A single domain cannot contain more than 20 cookies. each Cookie file has a maximum length of 4 K bytes. a browser can store up to 300 cookies.
Six attributes: name, value, expires, path, domain, and secure
Save form content
Control access authorization
3. write a general Cookie class
4. solutions
Cookie access optimization
Saves a series of cookie data to an array.
Check whether the client supports
Set a cookie for the first time, and then call
Second-level domain name implementation
Setcookie (name, value, expires, path, 'domain. com', secure)
Cookie security
Cookie restrictions
5. session concept
6. session configuration
7. session application
Create
Modify
View the current sessionid
Change the expiration time session. cookie_lifetime
Destroys the current session
8. session encoding and decoding
Session_encode ()
Session_decode ()
9. Save the array in the session
10. Save the object in the session
11. session access optimization
12. Sharing sessions under multiple servers (important)
13. session Security
Bytes. 1. Cookie working principle setcookie () 2. Cookie application development can only read a single domain in the same domain and cannot exceed...