<html><body><?php// Define the full path to your folder, shouldn't need changing$path = "./"; // Open the folder$dir_handle = @opendir($path) or die("Unable to open folder"); // Loop through the fileswhile (false !== ($file = readdir($dir_handle))) { // Prevent this file itself being shown// If you want it to not display any other files// enter more of theseif($file == "index.php") continue; //Prevent folders showingif($file == ".") continue; if($file == "..") continue; // Display the resultsecho "<img src='$file' alt='$file'><br />"; } // Close itclosedir($dir_handle); ?></body></html>