Php – read all files and folders from a directory
Read all files and folders from a directory using scandir: $dir = “/temp”; $files = scandir($dir); print_r($files); Read all files and folders from a directory using opendir: $dir = “/temp/” if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo “Filename: ” . $file . “: filetype: ” .