Answers for "list directory contents php"

PHP
0

php directory listing

if ($handle = opendir('.')) {

    while (false !== ($entry = readdir($handle))) {

        if ($entry != "." && $entry != "..") {

            echo "$entry\n";
        }
    }

    closedir($handle);
}
Posted by: Guest on June-08-2020
0

php list directories

$dir = '.';
$directories = glob($dir . '/*', GLOB_ONLYDIR);
Posted by: Guest on July-22-2020

Code answers related to "list directory contents php"

Browse Popular Code Answers by Language