在php7中读取POST数据[重复]

This question already has an answer here:

Submitting this form:

<?php
var_dump($_POST);
var_dump(file_get_contents("php://input"));
?>
<form method="post" enctype="multipart/form-data">
<input name="test" value="0">
<input name="test[0].0" value="00">
<input name="test[0].1" value="01">
<input name="test[1].0" value="10">
<input name="test[1].1" value="11">
<input type="submit">
</form>

Results in:

array(1) {
  ["test"]=>
  array(2) {
    [0]=>
    string(2) "01"
    [1]=>
    string(2) "11"
  }
}
string(0) ""

How do I get the missing input values in php7 without changing the html code?

</div>

$HTTP_RAW_POST_DATA was deprecated in PHP 5.6 and removed completely in PHP 7.0.

You have to change your html code.

<input name="test[0][0]" value="00">
<input name="test[0][1]" value="01">
<input name="test[1][0]" value="10">
<input name="test[1][1]" value="11">

And then get them by

$_POST['test'][0][0]