Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.74 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4.     <title> Bildergallerie</title>
  5.     <meta charset="utf-8">
  6.     <meta name="description" content="Beispiel eines HTML Grundgerüst">
  7.    
  8.     <meta name="keywords" content="zli, modul 307, html, php">
  9.     <meta neme="autor" content="Moritz Meier">
  10. </head>
  11.    
  12. <body>
  13. <h1>Bildergalerie</h1>
  14. <?php
  15. $dir = "thumbnails/";
  16.  
  17. // Öffnen eines bekannten Verzeichnisses und danach seinen Inhalt einlesen
  18. if (is_dir($dir)) {
  19.    if ($dh = opendir($dir)) {
  20.        while (($file = readdir($dh)) !== false) {
  21.             //ich überprüfe dass nur thumbnails geöffnet werden
  22.             if(is_file( $dir.$file))
  23.            echo '<img src=" ' .$dir.$file. ' " >' .  '<br>';
  24.         }
  25.         closedir($dh);
  26.     }
  27. }
  28. ?>
  29.  
  30.  
  31.  
  32. </body>
  33.    
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement