Differences before get and post, cookie and session, include, and require

Source: Internet
Author: User

I. The differences between include and require in PHP

1. Include is loaded at the time of use

2. Require load from the beginning

3. The _once suffix indicates that the load is not loaded

4. When the include introduces a file, it encounters an error, gives a hint, and continues to run the following code

5. When the require introduces the file, it will give a prompt and stop running the following code.

Second, the difference between the cookie and session:

1. The data of the cookie is stored on the browser and the session data is stored on the server;

2. Cookies are not very secure, others can analyze cookies stored locally and make cookie spoofing, and if they consider security, use the session

3. Session will be stored on the server for a certain period of time, when the increase in access, will be compared to occupy your server performance considerations with server performance, you should use cookies

4. A single cookie cannot hold more than 4K of data, and many browsers limit a maximum of 20 cookies per site

5. Personal advice:

Storing important information, such as login information, as a session

Other information that needs to be retained can be placed in a cookie

Three, get and post introduction

1. Get is the plaintext transfer data, post is ciphertext transmission

2. Get is not transmitted in a secure manner, and the value of the transferred value is displayed in the URL box during transmission

3. Get transmits a small amount of data, and post can transmit a large amount of data

4. Get is the default method from


Differences before get and post, cookie and session, include, and require

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.