How does php parse the body sent by someone else's POST? -Php Tutorial

Source: Internet
Author: User
How does php parse the body sent by someone else's POST? How can I solve the problem of putting data from C # post in the body so that my interface can be called? how can I get the data in the body? Code instance


Reply to discussion (solution)

File_put_contents('test.txt ', print_r ($ _ POST, 1 ));

View file content

Jsonp receives the call interface.

I still don't know how to solve the problem. I don't even know how to test it ...... Test Code

$ Post = file_get_contents ("php: // input ");
Var_dump ($ post );

 


After the opposite side is post, check the content of data.txt.

 


After the opposite side is post, check the content of data.txt.


Someone else said that he put all the data in the body, for example, put the name, student ID, and other information in the form of a string in the body. post it to me. I don't understand what it means. what is it like to put the data in the body? how can I receive the data?


 


After the opposite side is post, check the content of data.txt.


Someone else said that he put all the data in the body, for example, put the name, student ID, and other information in the form of a string in the body. post it to me. I don't understand what it means. what is it like to put the data in the body? how can I receive the data?



Well. I have already made it very clear.
Try the code

Put it in the body post is to put the binary post in the header.
Reference: http://blog.csdn.net/fdipzone/article/details/40098169

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.