In the PHP interview, a high-frequency question is asked how to get and post the way the difference between the submission, so I would like to make a simple comparison from five aspects.
different aspects |
POST |
GET |
Data location |
The body of the HTTP |
Header |
Vmcontext |
Ciphertext |
Plaintext |
Data security |
Relatively safe |
URL is not secure enough to pass the parameter |
Length limit |
1024 characters |
2 m, adjustable as needed |
Application Scenarios |
Querying data to the server |
Update data |
Last Note:
HTTP defines different ways to interact with the server, with 4 basic methods, namely get,post,put,delete.
url full name is a resource descriptor, we can think of: a URL address, which is used to describe a network of resources, and HTTP get,post,put,delete corresponds to the of this resource; Check , change , add , delete 4 an operation.
get is typically used to Get/Query resource information, and post is typically used to Update resource information.
This article is from the "Hello I am Forest" blog, please make sure to keep this source http://chensenlin.blog.51cto.com/10559465/1863581
Comparison of how get and post are submitted in PHP