<form name="idx" action="__APP__/Index/saveData" method="post" enctype="multipart/form-data">
<dl>
<dt><p>Banner部分(Big Slider)</p></dt>
<dd><input type="file" name="big[]" /></dd>
<dd><input type="file" name="big[]" /></dd>
<dd><input type="file" name="big[]" /></dd>
</dl>
<p><input type="button" value="增加" class="addPic"/></p>
<dl id="scrollpic">
<dt><p>网点分布(Small Slider)</p></dt>
<dd><input type="file" name="sml[]" /></dd>
<dd><input type="file" name="sml[]" /></dd>
<dd><input type="file" name="sml[]" /></dd>
</dl>
<p><input type="button" value="增加" class="addPic"/></p>
<div>
<p>选项卡模块</p>
教育:
<div class="idx-con">
<input type="file" name="tab[]" /><br/>
<textarea cols="40" rows="10" name="edu"></textarea>
</div>
佳酿:
<div class="idx-con">
<input type="file" name="tab[]" /><br/>
<textarea cols="40" rows="10" name="100"></textarea>
</div>
互联:
<div class="idx-con">
<input type="file" name="tab[]" /><br/>
<textarea cols="40" rows="10" name="wirels"></textarea>
</div>
逸游:
<div class="idx-con">
<input type="file" name="tab[]" /><br/>
<textarea cols="40" rows="10" name="game"></textarea>
</div>
</div>
<p><input type="submit" value="SUBMIT" /><input type="reset" value="RESET" /></p>
</form>一个form表单,图片分三组big[],sml[],tab[],提交后只提交成功big[]组的三个图片.dump($this->upload->getUploadFileInfo())显示:
array(3) {
[0] => string(25) "./Upload/index/th (1).jpg"
[1] => string(25) "./Upload/index/th (2).jpg"
[2] => string(25) "./Upload/index/th (3).jpg"
}dump($_FILES)显示:array(3) {
["big"] => array(5) {
["name"] => array(3) {
[0] => string(10) "th (1).jpg"
[1] => string(10) "th (2).jpg"
[2] => string(10) "th (3).jpg"
}
["type"] => array(3) {
[0] => string(10) "image/jpeg"
[1] => string(10) "image/jpeg"
[2] => string(10) "image/jpeg"
}
["tmp_name"] => array(3) {
[0] => string(14) "/tmp/phpfhptCg"
[1] => string(14) "/tmp/phpWrIcMl"
[2] => string(14) "/tmp/phpVDNWVq"
}
["error"] => array(3) {
[0] => int(0)
[1] => int(0)
[2] => int(0)
}
["size"] => array(3) {
[0] => int(3781)
[1] => int(4457)
[2] => int(5074)
}
}
["sml"] => array(5) {
["name"] => array(3) {
[0] => string(10) "th (4).jpg"
[1] => string(10) "th (5).jpg"
[2] => string(10) "th (6).jpg"
}
["type"] => array(3) {
[0] => string(10) "image/jpeg"
[1] => string(10) "image/jpeg"
[2] => string(10) "image/jpeg"
}
["tmp_name"] => array(3) {
[0] => string(14) "/tmp/phpignH5v"
[1] => string(14) "/tmp/phpznssfB"
[2] => string(14) "/tmp/phpcfXipG"
}
["error"] => array(3) {
[0] => int(0)
[1] => int(0)
[2] => int(0)
}
["size"] => array(3) {
[0] => int(5084)
[1] => int(2495)
[2] => int(5012)
}
}
["tab"] => array(5) {
["name"] => array(4) {
[0] => string(10) "th (7).jpg"
[1] => string(10) "th (8).jpg"
[2] => string(10) "th (9).jpg"
[3] => string(11) "th (10).jpg"
}
["type"] => array(4) {
[0] => string(10) "image/jpeg"
[1] => string(10) "image/jpeg"
[2] => string(10) "image/jpeg"
[3] => string(10) "image/jpeg"
}
["tmp_name"] => array(4) {
[0] => string(14) "/tmp/phpcqMfzL"
[1] => string(14) "/tmp/phpZxLdJQ"
[2] => string(14) "/tmp/phpYKfiTV"
[3] => string(14) "/tmp/phpxxBn30"
}
["error"] => array(4) {
[0] => int(0)
[1] => int(0)
[2] => int(0)
[3] => int(0)
}
["size"] => array(4) {
[0] => int(6391)
[1] => int(3466)
[2] => int(5510)
[3] => int(4200)
}
}
}请教问题:UploadFile.class.php不能上传所有分组?$_FILES能够获取到所有分组,如何将剩下的两个分组上传?前辈给个思路.
最佳答案