Php5 and mysql5web development technology-10php session management php5 and mysql5web development technology-10p_PHP tutorial

Source: Internet
Author: User
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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.