I use the following code in my form .
I tried
and got
I also tried
but it also returned false because do_upload would finally try to access $_FILES['bbs_images'][0] and finally got NULL.
So, How could I use Upload::do_upload since the structure of $_FILES['bbs_images'] is as follows ?
Code:
<input type="file" name="bbs_images[]">
<input type="file" name="bbs_images[]">
I tried
PHP Code:
$this->upload->do_upload('bbs_images');
and got
Code:
Message: is_uploaded_file() expects parameter 1 to be string, array given
I also tried
PHP Code:
$this->upload->do_upload('bbs_images[0]');
So, How could I use Upload::do_upload since the structure of $_FILES['bbs_images'] is as follows ?
PHP Code:
array (size=5)
'name' =>
array (size=2)
0 => string 'XXX.xls'
1 => string 'XXX.sql'
'type' =>
array (size=2)
0 => string 'XXX'
1 => string 'XXX'
'tmp_name' =>
array (size=2)
0 => string 'XXX'
1 => string 'XXX'
'error' =>
array (size=2)
0 => int 0
1 => int 0
'size' =>
array (size=2)
0 => int XX
1 => int XXX