<form action="file-upload.php" method="post" enctype="multipart/form-data">
Send these files:<br>
<input name="userfile[]" type="file"><br>
<input name="userfile[]" type="file"><br>
<input type="submit" value="Send files">
</form>
//------------------
//你将得到如下变量:
$userfile['name'][0],
$userfile['tmp_name'][0],
$userfile['size'][0], and $userfile['type'][0]
//同样如你的例子应有以下变量:
$array1[0],...,$array1[n]//************************
我这有英文原版的CHM帮助文档,非常详细,有需要请email.
Send these files:<br>
<input name="userfile[]" type="file"><br>
<input name="userfile[]" type="file"><br>
<input type="submit" value="Send files">
</form>
//------------------
//你将得到如下变量:
$userfile['name'][0],
$userfile['tmp_name'][0],
$userfile['size'][0], and $userfile['type'][0]
//同样如你的例子应有以下变量:
$array1[0],...,$array1[n]//************************
我这有英文原版的CHM帮助文档,非常详细,有需要请email.
<input type=hidden name='array1[]' value='1'>
<input type=hidden name='array1[]' value='2'>
……到时候传过去就有:
array1[0]=1
array1[1]=2
还不如先用implode将数组合并成字符串,传过去以后再用explode分解成数组
只须加个循环就行了,且无后顾之忧:
for($i=0;$i<count($passarray);$i++)
echo "<input type=hidden name='array1[]' value='$passarray[$i]'>";到时候传过去就有:
array1[0]=1
array1[1]=2