Welcome Guest, Not a member yet? Register   Sign In
upload library with dynamic $_FILES
#1

[eluser]Dennis_gull[/eluser]
Hi,

I'm trying to upload a dynamic number of files but It seems like the upload library won't support it, does anyone know if there's a solution for this?

Example:
Code:
<input type="file" name="img[]" />
<input type="file" name="img[]" />

This would then result in an array like this:
Code:
array(5) {
  ["name"]=>
  array(2) {
    [0]=>
    string(23) "file1.png"
    [1]=>
    string(26) "file2.png"
  }
  ["type"]=>
  array(2) {
    [0]=>
    string(9) "image/png"
    [1]=>
    string(9) "image/png"
  }
  ["tmp_name"]=>
  array(2) {
    [0]=>
    string(23) "C:\wamp\tmp\php8EBB.tmp"
    [1]=>
    string(23) "C:\wamp\tmp\php8EBC.tmp"
  }
  ["error"]=>
  array(2) {
    [0]=>
    int(0)
    [1]=>
    int(0)
  }
  ["size"]=>
  array(2) {
    [0]=>
    int(187753)
    [1]=>
    int(197073)
  }
}


Messages In This Thread
upload library with dynamic $_FILES - by El Forum - 03-23-2010, 03:20 PM
upload library with dynamic $_FILES - by El Forum - 03-23-2010, 04:11 PM



Theme © iAndrew 2016 - Forum software by © MyBB