Php $ _ FILES for post data processing

Source: Internet
Author: User
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!

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.