[英]Why is my field not in $_POST when it is in the HTTP Form Data?
I have an HTML form with method="POST"
. 我有一个带有method="POST"
的HTML表单。 There is a button with name="submit"
in the form, plus a large number of hidden input fields with various names and values. 表单中有一个带有name="submit"
的按钮,以及大量具有不同名称和值的隐藏输入字段。 I can see all the expected data coming through in the Request Header Form Data in my browser inspector. 我可以在浏览器检查器的“请求标头表单数据”中看到所有预期的数据。 However, the submit
field is not present in $_POST
in the php script that is the form's action
target. 但是,作为表单action
目标的php脚本中的$_POST
中没有submit
字段。
What am I doing wrong? 我究竟做错了什么?
Some extra tidbits: 一些额外的花絮:
$_POST
新名称仍在表单数据中,但不在$_POST
The problem was that I needed up bump up the max_input_vars
value in my php.ini
file. 问题是我需要提高php.ini
文件中的max_input_vars
值。 The number of hidden inputs was greater than max_input_vars
and so $_POST
was getting truncated, leaving off my submit
input var. 隐藏输入的数量大于max_input_vars
,因此$_POST
被截断,从而max_input_vars
了我的submit
输入var。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.