class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
See all posts Reply
include('class.upload.php'); $files = array(); foreach ($_FILES['my_field'] as $k => $l) { foreach ($l as $i => $v) { if (!array_key_exists($i, $files)) $files[$i] = array(); $files[$i][$k] = $v; } } foreach ($files as $file) { $handle = new Upload($file); if ($handle->uploaded) { // [...] } }
echo print_r($files, 1); foreach ($files as $file) {
include('class.upload.php'); $files = array(); foreach ($_FILES['my_field'] as $k => $l) { foreach ($l as $i => $v) { if (!array_key_exists($i, $files)) $files[$i] = array(); $files[$i][$k] = $v; } } foreach ($files as $file) { $handle = new Upload($file); if ($handle->uploaded) { // [...] } }echo print_r($files, 1); foreach ($files as $file) {