Hallo ich habe mir ein Script gebastelt, womit ich Bilder aus einem Ordner auslesen.
Doch ich weiss ich nicht wie ich so eine Blätterfunktion hinkriegen soll. Bei MySQL wäre das kein Problem, jetzt ist es für mich eins
Hier mein Script:
Doch ich weiss ich nicht wie ich so eine Blätterfunktion hinkriegen soll. Bei MySQL wäre das kein Problem, jetzt ist es für mich eins
Hier mein Script:
PHP:
<?php
$stPath = 'ordner/';
$hDir = opendir($stPath);
$spalte=0;
echo "<table cellspacing=\"3\" cellpadding=\"3\">";
echo "<tr>";
while($stFile = readdir($hDir))
{
if($stFile != '.' && $stFile != '..')
{
echo "<td width=\"50\" height=\"50\" valign=\"middle\" align=\"center\" style=\"BORDER:1px solid #CCCCCC;\">";
echo "<img src=\"".$stPath.$stFile."\">";
echo "</td>";
$spalte++;
if($spalte >= 8)
{
echo "</tr><tr>";
$spalte = 0;
}
}
}
echo "</tr></table>";
closedir($hDir);
?>