$http_raw_post_data function usage

WBOY
Release: 2016-08-08 09:20:23
Original
2347 people have browsed it

Variables sent via HTTP POST will not appear in the URL.

When we cannot receive the information from the page using $_POST, we can use php://input to receive the value. So what is the difference between the two?

First of all, $_POST and php://input $HTTP_RAW_POST_DATA is empty when the value can be obtained;

$http_raw_post_data is a global variable built into PHP. It is used by PHP to fill the POST data into the variable $http_raw_post_data as it is when the Content-Type cannot be recognized. It also cannot read POST data whose Content-Type is multipart/form-data. You need to set the always_populate_raw_post_data value in php.ini to On so that PHP will always fill in the POST data into the variable $http_raw_post_data.

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the use of the $http_raw_post_data function, including the relevant aspects. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template