/ Published in: PHP
This code allows to list the contents of any given directory.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function list_directory_content($dir){ if($file != '.' && $file != '..' && $file != '.htaccess'){ echo '<a target="_new" href="'.$dir.$file.'">'.$file.'</a><br>'."\n"; } } } } } ?>
URL: http://www.apphp.com/index.php?snippet=php-list-directory-contents