Answers for "php file iterator"

PHP
0

php file iterator

Shows us all files and catalogues in directory except "." and "..".

<?php

foreach (new DirectoryIterator('../moodle') as $fileInfo) {
    if($fileInfo->isDot()) continue;
    echo $fileInfo->getFilename() . "<br>\n";
}

?>
Posted by: Guest on September-13-2021

Browse Popular Code Answers by Language