Detailed explanation of php5 and mysql5 web development technology-10 php session management Detailed explanation of php5 and mysql5 web development technology-10 p_PHP tutorial

WBOY
Release: 2016-07-14 10:09:28
Original
975 people have browsed it

Session management is an important part of web development, including Session and Cookie technologies.

1. How Cookie works
setcookie()
2. Cookie application development
Can only read the domain
A single domain cannot exceed 20 cookies. The maximum length of each cookie file is 4k bytes. The browser can store up to 300 cookies
6 attributes: name, value, expires, path, domain, secure
Save form content
Control access authorization
3. Write a general Cookie class
4. Solution
Cookie access optimization
You can save a series of cookie data into an array
Detect whether the client supports
Try to set a cookie on the first run 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 current sessionid
Change expiration time session.cookie_lifetime
Destroy the current session
8. Session encoding and decoding
session_encode()
session_decode()
9. Save array in session
10. Save objects in session
11. Session access optimization
12. Sharing sessions on multiple servers (important)
13. Session security

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477689.htmlTechArticleSession 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 the domain where it is located. A single domain cannot exceed...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!