Recently in doing some work on file upload, the way encountered the following problems:
Submit the form as a post to a URL with a parameter (such as: RES.PHP?PARAM=AAA), so what will be the result?
Here's a few examples of how get and post related content to test, first look at the simplest
Submitted to the URL that already has this parameter, the result is that the corresponding value is overwritten and the param of the BBB is obtained.
What if the URL contains a parameter but is different from the name in the form? Look at the test example below
The result is correct to get the value of the param2, but does not get the value of the param1, stating that the get way to submit all the parameters of the original URL removed.
Let's look at the post mode submission
First, take a look at the same name value.
In this case, the result of the output is obtained by getting the Aaa,post method to obtain the BBB, which indicates that the case does not affect each other. Get is separated from post separately.
Let's take a look at the arguments that follow the post method to get the URL
In this case, the parameters obtained are all empty, so it can be said that the parameters obtained in PHP are isolated from each other.
Today, however, when uploading files using Java, you can get all the data correctly, that is, the servlet can use request to get the form data either post or URL. After all, the method of getting parameters in the servlet is the same.