When the data submitted by the form exceeds 1000, it is always less than `$ _ POST` when it is obtained with `php:// input` and `$ _ POST`, respectively.

there is a form that submits more than 1000 pieces of data

<input type="checkbox" name="order_ids[]" value="1" >
<input type="checkbox" name="order_ids[]" value="2" >
<input type="checkbox" name="order_ids[]" value="3" >
...
<input type="checkbox" name="order_ids[]" value="1900" >

use these two outputs in the background after submission

  1. file_get_contents ("php://input")

    string (19755) "order_ids%5B%5D=1&order_ids%5B%5D=2&order_ids%5B%5D=3&.&order_ids%5B%5D=1900
  2. $_ POST

    array(1) {
     ["order_ids"] => array(898) {
       [0] => string(5) "1"
       [1] => string(5) "2"
       [2] => string(5) "3"
       ......
       [1000] => string(5) "10001"
     }

    }

when the amount of data exceeds 1000, file_get_contents ("php://input") outputs the result I want, but $_ POST is 1001 pieces of data, but this situation does not exist when it is below 1000. Is it the problem with my php.ini configuration that limits the size of POST ?
solve

Php
Jul.09,2021

found the reason and also set the configuration of php.ini
max_input_vars = 1000 after adjustment
http://php.net/manual/zh/info.


php.ini can set the maximum deliverable size of post. The default is 2m.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4bc42-44e5e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4bc42-44e5e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?