bilder im verzeichniss anzeigen?
Verfasst: 29.11.2006 16:30
gibt es ein script, das automatisch alle bilder im verzeichniss als vorschau geortnet anzeigt? dass man wenn man neue hat nicht immer die htm datei muss bearbeiten..
phpBB.de - Die deutsche phpBB-Community
https://www.phpbb.de/community/
Code: Alles auswählen
<?php
$dir = "VERZEICHNISS/";
function image_list($dir)
{
echo "<table border='1' width='100%' cellpadding=3 cellspacing=0><tr><td><b>List of Files in"; echo "/$dir</b></td></tr>";
echo "<tr><td>";
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false )
{
$path = $dir.$file;
if ( $file != 'Thumbs.db' && $file != 'index.html' && is_file($path) )
{
echo "<a href='.$dir.$file.'><img src=".$dir.$file." width=100 px height=100 px></a> ";
}
}
closedir($dh);
}
}
echo "</td></tr>";
echo "</table>";
}
image_list($dir);
?>