Hi,
I want to display every image that is in a directory. So far I have
PHP Code:
<?php
// Define the full path to your folder, shouldn't need changing $path = "gallery/";
// Open the folder $dir_handle = @opendir($path) or die("Unable to open folder");
// Loop through the files while (false !== ($file = readdir($dir_handle))) {
// Prevent this file itself being shown // If you want it to not display any other files // enter more of these if($file == "index.php") continue; //Prevent folders showing if($file == ".") continue; if($file == "..") continue;
// Display the results echo "<img src='$file' alt='$file'><br />";
}
// Close it closedir($dir_handle);
?>
but this only shows the file name, not the image.
Does anybody know how to swith this so it would show the image. Thanks
Alex
__________________
Alex
|