Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to understand the relationship between get and post

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article introduces the relevant knowledge of "how to understand the relationship between get and post". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Here are a few examples to test the content related to get and post. First, take a look at the simplest

Submit it to the url that already has this parameter in the way of get, and the result is that the corresponding value is overwritten, and the obtained param is bbb.

What if the parameters in url are different from the name in the form? Look at the following test example

This result is correct to get the value of param2, but not the value of param1, indicating that the original url parameters are removed when submitted in get mode.

Let's take another look at the post submission.

First of all, let's take a look at what happens when the name is the same.

In this case, the output is get and aaa,post is bbb, indicating that it does not affect each other. Get and post are isolated.

Let's take a look at how to use post to get the parameters after url.

In this case, all the parameters obtained are empty, so it can be said that the parameters obtained by get and post in php are isolated from each other.

However, today, when you use java for file upload, you can get all the data correctly, that is, you can use request in servlet to obtain either post form data or get data after url. After all, the method of getting parameters in servlet is the same.

This is the end of "how to understand the relationship between get and post". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report