/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? /** * Change the path to your folder. * * This must be the full path from the root of your * web space. If you're not sure what it is, ask your host. * * Name this file index.php and place in the directory. */ // Define the full path to your folder from root $path = "/home/user/public/foldername/"; // Open the folder // Loop through the files if($file == "." || $file == ".." || $file == "index.php" ) continue; echo "<a href=\"$file\">$file</a><br />"; } // Close ?>
URL: http://www.totallyphp.co.uk/scripts/directory_lister.htm
Comments
