show all jpgs in dir
- <html>
- <body>
- <?php
- // Define the full path to your folder, shouldn't need changing
- $path = "./";
- // Open the folder
- // Loop through the files
- // 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
- ?>
- </body>
- </html>