max_input_vars

Cherish_ws Cherish_ws 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
设置:max_input_vars = 3

index.html
<html>
<form action="index.php" method="post">
<input type="text" name="name[xiaoming][like][fruit][]" value="apple">
<input type="text" name="name[xiaoming][like][fruit][]" value="apple2">
<input type="text" name="name[xiaoming][like2][fruit][]" value="apple3">
<input type="text" name="a" value="a">
<input type="text" name="b" value="b">
<input type="text" name="c" value="c">

<input type="submit" value="submit">
</form>
</html>

index.php
<?php
print_r($_POST);
?>


输出:
Array
(
[name] => Array
(
[xiaoming] => Array
(
[like] => Array
(
[fruit] => Array
(
[0] => apple
[1] => apple2
)

)

[like2] => Array
(
[fruit] => Array
(
[0] => apple3
)

)

)

)

[a] => a
)


数组形式的变量个数是怎么计算的?
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
Cherish_ws
基础编程 21,889 成员 140,329 内容