List directory files (PHP)
by spyka (http://www.spyka.net)
Lists the files inside a given directory
Just change the path to the folder you want to list files out of
<?php
if ($handle = opendir('/path/to/files')) {
echo "Directory handle: $handle\n";
echo "Files:\n";
// List all the files
while (false !== ($file = readdir($handle))) {
echo "$file\n";
}
closedir($handle);
}
?>