<?php //open the current directory $directory = opendir('.'); while ($file = readdir($directory)) { $filenames[] = $file; } foreach ($filenames as $file) { echo "$file<br>"; } ?>
IT
<?php //open the current directory $directory = opendir('.'); while ($file = readdir($directory)) { $filenames[] = $file; } foreach ($filenames as $file) { echo "$file<br>"; } ?>