Php method for handling request payload parameters in requests

Source: Internet
Author: User
Last night developed a feature discovery, the parameters are appended to the request payload when a post is sent on the Ant design front page.
= "alt=" PHP Processing Request payload parameter method "/>
At this point, the server-side PHP $_post can not be resolved, due to time is not to find the ant design request implementation. (mainly refer to the following method does not solve the problem)

      headers: {      ‘Content-Type‘: ‘application/x-www-form-urlencoded;charset=UTF-8‘,    },

Temporary on the server side, the workaround is as follows:

$final = file_get_contents(‘php://input‘);if ($final) {        $final = json_decode($final);      // $final即可为获得文本}

As for, in the content that contains the picture, the document, still did not do this business, temporarily to be continued ...

Php method for handling request payload parameters in requests

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.