Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Blablabla</title>
- </head>
- <body>
- <?php
- $directory = "../images/";
- //get all image files with a .jpg extension.
- $images = glob($directory . "*.jpg");
- //print each file name
- foreach($images as $image)
- {
- echo $image;
- }
- ?>
- <img src="<?php echo $image; ?>">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment