cliodriver
Mitglied
ok, natsort() passt besser
muss jetzt noch die ausgabe basteln
muss jetzt noch die ausgabe basteln
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
<?php
$dir = opendir($imagepath);
$files = array();
while ($file = readdir ($dir))
{
if ($file != "." AND $file != "..")
$files[] = $file;
}
closedir($dir);
natsort($files);
foreach($files AS $file)
{
echo "<a href='$imagepath/$file' rel='lightbox[Bild]' title='$file'><img src='$imagepath/file' alt='$file' width='140' hspace='15' vspace='15' border='0'></a>";
}
?>
foreach($files AS $file)
{
$imageInfo = @getimagesize($file);
if( isset($imageInfo[2]) && intval($imageInfo[2]) >= 1 && intval($imageInfo[2]) <= 16 )
{
echo "Datei $file als Bild identifiziert<br/>";
}
}
<?php
$dir = opendir($imagepath);
$extensions = array("jpg", "gif", "jpeg", "png", "JPG");
$files = array();
while ($file = readdir ($dir))
{
if ($file != "." AND $file != "..")
$files[] = $file;
}
closedir($dir);
natsort($files);
foreach($files AS $file)
{
if(in_array(pathinfo($file, PATHINFO_EXTENSION), $extensions))
{
echo "<a href='$imagepath/$file' rel='lightbox[Bild]' title='$file'><img src='$imagepath/$file' alt='$file' width='140' hspace='15' vspace='15' border='0'></a>";
}
}
?>