Php $ _ FILES: post data processing. the vc client sends the following two pieces of data to the php server for resolution: administrator: 123and abc.txt. you can use pai_filesto receive the abc.txt file, but how can I receive the administrator: 123 between name = "user" and ---- MULTI-PARTS-FORM-DATA-BOUNDARY? After receiving the data, how does one send administrator: 123 to the first line of the abc.txt file? Please give me some advice. Thank you!
---- MULTI-PARTS-FORM-DATA-BOUNDARY
Content-Disposition: form-data; name = "user"
Administrator: 123----multi parts-form-data-boundary
Content-Disposition: form-data; name = "upload"; filename = "abc.txt"
Content-Type: text/plain
Verify: local
Id: 1111
Host: 2.2.2.2
Id: 2222
Host: 3.3.3.3
Id: 3333
Host: 4.4.4.4
Reply to discussion (solution)
Print_r ($ _ SERVER); what can be seen
This function seems to have no data. Is there any other way?
If the data volume is small, you can write headers, for example, as cookies.
Fortunately, I don't know how to retrieve Content-Disposition: form-data; name = "user"
Administrator: 123 data in 123. Does anyone know?
The problem is that Content-Disposition is usually used for the header sent from the server to the client. it is rarely used in reverse order?
In fact, you can use $ _ GET to GET unimportant values as URLs ......
The problem is that Content-Disposition is usually used for the header sent from the server to the client. it is rarely used in reverse order? // This is not necessarily the case. continue to give pointers. thank you.
Print_r ($ _ POST );
Print_r ($ _ FILES );
Try these two
Observation
Print_r ($ _ FILES );
Print_r ($ _ POST );
Echo file_get_contents ('php: // input ');
Result
Use $ _ POST to solve the problem. thank you!