Post data issue for socket in Apache+php5+mysql

Source: Internet
Author: User

Recently colleague reflects not receive my router post data, also always said is my router problem!!!!

About this kind of thing, I always despise, I only do is on the server open Wireshark, grab the bag to him to see, you see not, this is not I send you data, see on their own to check the problem it.

Who knows, this is not over, feel that people who write PHP do not like the principle of thinking.


Well, tell me about the problem, I helped him check it last night.


Server segment receive needs to open Always_populate_raw_post_data = on in php.ini
and accept the variable as $http_raw_post_data or $globals["Http_raw_post_data") or file_get_contents ("Php://input"), cannot use $_post

Server-side test code test.php:

<?php
Header ("Content-type:text/plain;charset=utf-8")
Print_r ("Hello wowrld\n");
Print_r ($_post);
echo $HTTP _raw_post_data;
echo $GLOBALS ["Http_raw_post_data"];
Echo file_get_contents ("Php://input");
?>



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.