Die Pfade:
Hier der Code:
Fehler gleich am Anfang, der Ausdruck while($folder = readdir($verz))
Error: Warning: readdir(): 6 is not a valid Directory resource
Die Bilder sind in 2 ordner drüber, sprich /gallery/ordner/
PHP-Code:
$location = "Hier der Pfad (komplet)... /page/gallery/";
$location_img = "/page/gallery/";
PHP-Code:
if(!isset($folder))
{
echo "<table><tr>";
$gallery_counter_1 = 1;
$gallery_counter_2 = 5;
$verz = opendir($ordner."/".$location);
while($folder = readdir($verz))
{
if($folder == "." or $folder == "..")
{}
else
{
if($gallery_counter_1/$gallery_counter_2 != 1)
{
echo "<td><a href=\"gallery.php?folder=$folder\">";
$location_folder = "Hier der Pfad (komplet)... /page/gallery/$folder/";
$location_link = "/page/gallery/$folder/";
$verz_bild = opendir($ordner."/".$location_folder);
while($file = readdir($verz_bild))
{
if($file == "." or $file == ".." or $file == "Thumbs.db" or ($zaehler > 0))
{}
else
{
echo "<img src=\"$location_link$file\" width=\"128\" height=\"96\">";
$gallery_counter_1 = $gallery_counter_1+1;
}
}
echo "<br>$folder</a></td><br>";
}
else
{
echo "<td><a href=\"gallery.php?folder=$folder\">";
$location_folder = "Hier der Pfad (komplet)... page/gallery/$folder/";
$location_link = "/page/gallery/$folder/";
$verz_bild = opendir($ordner."/".$location_folder);
while($file = readdir($verz_bild))
{
if($file == "." or $file == ".." or $file == "Thumbs.db" or ($zaehler > 0))
{}
else
{
echo "<img src=\"$location_link$file\" width=\"128\" height=\"96\">";
$gallery_counter_1 = $gallery_counter_1+1;
$gallery_counter_2 = $gallery_counter_2+5;
}
}
echo "<br>$folder</a></td></tr><tr><br>";
}
}
closedir($verz);
echo "</table>";
}
}
else
{
$count1 = 1;
$count2 = 5;
$location_folder = "Hier der Pfad (komplet)... page/gallery/$folder/";
$location_link = "/page/gallery/$folder/";
$verz = opendir($ordner."/".$location_folder);
while($file = readdir($verz))
{
if($file == "." or $file == ".." or $file == "Thumbs.db")
{}
else
{
if($count1/$count2 != 1)
{
echo " <a href=\"$location_link$file\" target=\"\_blank\"><img src=\"$location_link$file\" width=\"128\" height=\"96\"></a> ";
$count1 = $count1+1;
}
else
{
echo " <a href=\"$location_link$file\" target=\"\_blank\"><img src=\"$location_link$file\" width=\"128\" height=\"96\"></a><br> ";
$count1 = $count1+1;
$count2 = $count2+5;
}
}
}
closedir($verz);
echo "<br><a href=\"gallery.php\">Zurück zur Gallery-Übersicht</a>";
}
Error: Warning: readdir(): 6 is not a valid Directory resource
Die Bilder sind in 2 ordner drüber, sprich /gallery/ordner/
Kommentar