advanced code snippet search
scalhoun2005 on 03/21/09
php list file
03/21/09 08:43am
<?PHP $folder = "myFolderName/"; $handle = opendir($folder); # Making an array containing the files in the current directory: while ($file = readdir($handle)) { $files[] = $file; } closedir($handle); #echo the files foreach ($files as $file) { echo "<a href=$folder$file>$file</a>"."<br />"; } ?>
Report this snippet Tweet
Comment:
You need to login to post a comment.