file_get_contents("php://input", "r")实例介绍
程序员文章站
2024-04-06 09:17:37
...
解释不清,直接上例子
index.html
复制代码 代码如下:
$raw_post_data = file_get_contents('php://input', 'r');
echo "-------$_POST------------------
";
echo var_dump($_POST) . "
";
echo "-------php://input-------------
";
echo $raw_post_data . "
";
?>
index.html
复制代码 代码如下:
action.php
$raw_post_data = file_get_contents('php://input', 'r');
echo "-------$_POST------------------
";
echo var_dump($_POST) . "
";
echo "-------php://input-------------
";
echo $raw_post_data . "
";
?>