Answers for "recursivedirectoryiterator only files"

0

recursivedirectoryiterator only files

$imagesList = array();
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator('images/')) as $filename) {
    if ($filename->isDir()) continue;
    $imagesList[] = str_replace("\\","/",$filename->getPathname());
}
print_r($imagesList);
Posted by: Guest on January-05-2021

Browse Popular Code Answers by Language