下面是测试代码
<?phpprint_r($_POST);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form method="post">
<input type="text" name="abc" value="sdf" />
<?php for($i=1;$i<=1000;$i++){?>
<input type="text" name="fname[<?=$i?>]" value="<?=$i?>" />
<?php }?>
<input type="submit" value="提交" name="smt" />
</form>
</body>
</html>
<?phpprint_r($_POST);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form method="post">
<input type="text" name="abc" value="sdf" />
<?php for($i=1;$i<=1000;$i++){?>
<input type="text" name="fname[<?=$i?>]" value="<?=$i?>" />
<?php }?>
<input type="submit" value="提交" name="smt" />
</form>
</body>
</html>
Array ( [abc] => sdf [fname] => Array ( [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8] => 8 [9] => 9 [10] => 10 [11] => 11 [12] => 12 [13] => 13 [14] => 14 [15] => 15 [16] => 16 [17] => 17 [18] => 18 [19] => 19 [20] => 20 [21] => 21 [22] => 22 [23] => 23 [24]
.
.
.
.
961 [962] => 962 [963] => 963 [964] => 964 [965] => 965 [966] => 966 [967] => 967 [968] => 968 [969] => 969 [970] => 970 [971] => 971 [972] => 972 [973] => 973 [974] => 974 [975] => 975 [976] => 976 [977] => 977 [978] => 978 [979] => 979 [980] => 980 [981] => 981 [982] => 982 [983] => 983 [984] => 984 [985] => 985 [986] => 986 [987] => 987 [988] => 988 [989] => 989 [990] => 990 [991] => 991 [992] => 992 [993] => 993 [994] => 994 [995] => 995 [996] => 996 [997] => 997 [998] => 998 [999] => 999 ) )
<input type="text" name="abc" value="sdf" />
<input type="submit" value="提交" name="smt" />现在缺少了 $_POST['smt']=$_POST['fname'][1000]='1000' 跟 $_POST['smt']='提交' 这两个值
你看看配置的post_max_size是多少。
帮下忙,问下你朋友同事谁知道不
如果换成这样有结果么?
echo $_POST['1000'];
echo $_POST['submit'];
没值
System Linux to8to 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64
Apache Version Apache/2.2.16 (Debian)
PHP/5.3.3-7+squeeze1
short_open_tag有开么?
(
[abc] => sdf
[fname] => Array
(
[1] => 1
[2] => 2
[3] => 3
[4] => 4
[5] => 5
[6] => 6
[7] => 7
[8] => 8
[9] => 9
[10] => 10
[11] => 11
[12] => 12
[13] => 13
[14] => 14
[15] => 15
[16] => 16
[17] => 17
[18] => 18
[19] => 19
[20] => 20
[21] => 21
[22] => 22
[23] => 23
[24] => 24
[25] => 25
[26] => 26
[27] => 27
[28] => 28
[29] => 29
[30] => 30
[31] => 31
[32] => 32
[33] => 33
[34] => 34
[35] => 35
[36] => 36
[37] => 37
[38] => 38
[39] => 39
[40] => 40
[41] => 41
[42] => 42
[43] => 43
[44] => 44
[45] => 45
[46] => 46
[47] => 47
[48] => 48
[49] => 49
[50] => 50
[51] => 51
[52] => 52
[53] => 53
[54] => 54
[55] => 55
[56] => 56
[57] => 57
[58] => 58
[59] => 59
[60] => 60
[61] => 61
[62] => 62
[63] => 63
[64] => 64
[65] => 65
[66] => 66
[67] => 67
[68] => 68
[69] => 69
[70] => 70
[71] => 71
[72] => 72
[73] => 73
[74] => 74
[75] => 75
[76] => 76
[77] => 77
[78] => 78
[79] => 79
[80] => 80
[81] => 81
[82] => 82
[83] => 83
[84] => 84
[85] => 85
[86] => 86
[87] => 87
[88] => 88
[89] => 89
[90] => 90
[91] => 91
[92] => 92
[93] => 93
[94] => 94
[95] => 95
[96] => 96
[97] => 97
[98] => 98
[99] => 99
...
[970] => 970
[971] => 971
[972] => 972
[973] => 973
[974] => 974
[975] => 975
[976] => 976
[977] => 977
[978] => 978
[979] => 979
[980] => 980
[981] => 981
[982] => 982
[983] => 983
[984] => 984
[985] => 985
[986] => 986
[987] => 987
[988] => 988
[989] => 989
[990] => 990
[991] => 991
[992] => 992
[993] => 993
[994] => 994
[995] => 995
[996] => 996
[997] => 997
[998] => 998
[999] => 999
[1000] => 1000
) [smt] => 提交
)
修改了下suhosin.ini 的以下几个参数suhosin.post.max_vars 默认是1000 改大来去掉前面的注释就行了suhosin.request.max_vars 默认是1000 改大来去掉前面的注释就行了suhosin.upload.max_uploads 默认好像是20 (这个是影响了最大的文件上传数)php.ini里也有一些影响的参数(看情况调)
post_max_size
upload_max_files
upload_max_size
memory_limit