I trying to use this code to upload multipal images into one
I only want to upload a specific file ‘thumb.jpg’ that is located in many different folders.
how can I navigate to multipal folders (ie, profile/X/thumb.jpg) while keeping the upload in a random order?
here is the code im working off:
[php]
$dir = ‘images’;
$file_display = array (‘jpg’);
if (file_exists($dir) == false) {
echo ‘Directory ‘’, $dir, ‘’ not found’;
} else {
$dir_contents = scandir($dir);
shuffle($dir_contents);
foreach ($dir_contents as $file) {
$file_type = strtolower(end(explode(’.’, $file)));
if ($file !== ‘.’ && $file !== ‘…’ && in_array($file_type, $file_display) == true) {
echo ‘’;
}
}
}
[/php]
thanks for your help.