I’m trying to define both [‘name’] and [‘tmp_name’], but i’m having no idea how to do so?
Here is my code:
foreach ($_FILES['uploads']['name'] as $filename) {
// Do stuff
}
But inorder to complete and move the file, I need the $_FILES['uploads']['tmp_name'] aswell. How do I define both? I tried looking it up, but found nothing.
Get the index from the foreach and access the associated entries:
Note: Do not use the unfiltered
namefor the target filename. That’s a client-supplied value and can contain anything.