So I've got a UDT that just reads out all directories and files in a given directory:
Code: Select all
if ($fh = opendir('uploads/mydir/')) {
while (false !== ($entry = readdir($fh))) {
if ($entry != "." && $entry != "..") {
$files[] = $entry;
}
}
closedir($fh);
}
return $files;
I'm pretty sure I'm missing something really simple, but I just don't see it.
I'm thankful for any help …
Stefan