|
Erstellt ein Array
Fügt ein oder mehr Elemente an das Ende eines Arrays
Gibt eine Nachricht aus und beendet das aktuelle Skript
Prüft, ob eine Datei oder ein Verzeichnis existiert
Copy and resize part of an image with resampling
Erzeugt ein neues Bild im JPEG-
Create a new true color image
Ausgabe des Bildes im Browser oder als Datei
Ermittelt die Bild-
Ermittelt die Bild-
Öffnen eines Verzeichnis-
Liest einen Eintrag aus einem Verzeichnis-
Zurücksetzen des Verzeichnis-
Sortiert ein Array |
Tutorials - Praxis - Thumb-Galerie - Thumbs ausgebenTutorials - PraxisThumb-Galerie: Thumbs ausgeben
<?php include("functions/check_thumb.php"); $files = $thumbs = array(); /* 2 Arrays werden erstellt */ $path = "/images/fotoalbum"; $verzeichnis = @opendir($path); if(!$verzeichnis) die("Kann Verzeichnis $path nicht öffnen"); rewinddir($verzeichnis); while($file = readdir($verzeichnis)) { if($file != "." and $file != "..") { array_push($files, "$file"); } } sort($files); foreach($files as $file) { $thumbfile = "/upload/thumbfiles/$file.thumb"; check_thumb("$path/$file", $thumbfile); echo "<div style=\"float:left; border:1px solid red; text-align:center; width:230px; height:230px;\"><img src=\"$thumbfile\" /></div>\n"; } ?> Da muss man halt etwas beim erstellen der Thumbs rumrechnen mit imagesx() und imagesy() und so... Siehe "Bilder und Thumbnails" |