Home >Backend Development >PHP Tutorial >Example analysis of the difference between $_POST and php://input in php, _post example analysis_PHP tutorial
This article analyzes the difference between $_POST and php://input in php with examples. Share it with everyone for your reference. The specific analysis is as follows:
$_POST and php tutorial://input can get the value, $HTTP_RAW_POST_DATA is empty
$_POST organizes the submitted data in an associative array and encodes it, such as urldecode, or even encoding conversion
php://input can also implement this function to obtain the original data of POST.
Code
php $_POST:
The $_POST variable is an array whose content is the variable name and value sent by the HTTP POST method.
The $_POST variable is used to collect values from the form with method="post". The information sent from the form with the POST method is invisible to anyone (will not be displayed in the browser's address bar ), and there is no limit on the amount of messages sent.
html
You are years old!
Variables sent via HTTP POST will not be displayed in the URL, and there is no length limit for variables.
I hope this article will be helpful to everyone’s PHP programming design.