dougua3706 2016-04-18 15:57
浏览 117

为什么PHP数据会截断POST数据?

I have a pretty big form with many-many items in it. After upgrading to PHP 7, in the new environment some of the POST elements are not received by the server. The $_POST array is not empty, it contains many elements, but some of the elements from the end of the $_POST array is missing.

No error messages appear.

Increasing post_max_size in php.ini (from 8M to 128M) did not help. The data structure itself is not too big, less than 400k, so this shouldn't be the reason.

Why can this be?

  • 写回答

1条回答 默认 最新

  • douhe6255 2016-04-18 15:57
    关注

    As of PHP 5.3.9. a new php.ini setting exists called max_input_vars. It determines how many items can be used from the received data. By default it is 1000 which means that only the first 1000 items from $_POST will be used.

    So, if increasing the post_max_size does not help then try to increase max_input_vars from 1000 to 5000 or whatever you need.

    More info: PHP Manual for max_input_vars

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大