Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <title> Bildergallerie</title>
- <meta charset="utf-8">
- <meta name="description" content="Beispiel eines HTML Grundgerüst">
- <meta name="keywords" content="zli, modul 307, html, php">
- <meta neme="autor" content="Moritz Meier">
- </head>
- <body>
- <h1>Bildergalerie</h1>
- <?php
- $dir = "thumbnails/";
- // Öffnen eines bekannten Verzeichnisses und danach seinen Inhalt einlesen
- if (is_dir($dir)) {
- if ($dh = opendir($dir)) {
- while (($file = readdir($dh)) !== false) {
- //ich überprüfe dass nur thumbnails geöffnet werden
- if(is_file( $dir.$file))
- echo '<img src=" ' .$dir.$file. ' " >' . '<br>';
- }
- closedir($dh);
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement