Hallo Leute
es geht um folgende Datei:
<?php
$Bilder = array();
$Pfad = "./" . $_GET['kat'] . "/";
$handle = opendir($Pfad);
while ($file = readdir ($handle)){
if (($file != "." && $file != "..") && (!fnmatch("*.htm*", $file)) && (!fnmatch("*.html*", $file)) && (!fnmatch("*.php*", $file)) && (!fnmatch("*_th.jpg*", $file))){
$Bilder[] = $file;
}
}
closedir($handle);
if(isset($_GET['Bild'])){
$Bild = $_GET['Bild'];
}else{
$Bild = 1;
}
echo "<table width=\"600px\" cellspacing=\"5px\" border=\"0\" align=\"center\">";
echo "<tr>";
echo "<td colspan=\"3\" width=\"600px\" height=\"397px\" align=\"center\"><img src=\"" . $Pfad . $Bilder[$Bild - 1] . "\" class=\"border\" onclick=\"window.close()\"></td>";
echo "</tr><tr>";
if($Bild > 1){
echo "<td width=\"250px\" align=\"right\" class=\"text\"><a href=\"" . $_SERVER['PHP_SELF'] . "?Bild=" . ($Bild - 1) . "&kat=" . $_GET['kat'] . "\"><img src=\"../pfeil_zurueck.gif\" width=\"60\" height=\"60\" alt=\"Back\" border=\"0\"></a></td>";
}
else{
echo "<td align=\"left\" width=\"250px\"></td>";
}
echo "<td align=\"left\" width=\"100px\" class=\"text\"></td>";
if($Bild < count($Bilder)){
echo "<td width=\"250px\" align=\"left\" class=\"text\"><a href=\"" . $_SERVER['PHP_SELF'] . "?Bild=" . ($Bild + 1) . "&kat=" . $_GET['kat'] . "\"><img src=\"../pfeil_vor.gif\" width=\"60\" height=\"60\" alt=\"Next\" border=\"0\"></a></td>";
}
else{
echo "<td align=\"left\" width=\"250px\"></td>";
}
echo "</tr></table>";
?>
?>
ich bin gerade erst dabei php zu "entdecken"
das Problem ist dieses "script" liest den Ordner nach der reihe aus bzw offnet das bild wenn ich auf das richtige thumbnail drück
(thumb 2 --> bild 2 groß)
hat auf unserem altem server wunderbar geklappt aber seit das ganze system und internetseiten umgezogen ist, öffnen sich die bilder nicht mehr richtig sondern irgendwie
(thumb 2 --> bild 6 groß)
liegt das am array?
hoff ihr könnt mir noch was beibringen
grüße
my_self
es geht um folgende Datei:
<?php
$Bilder = array();
$Pfad = "./" . $_GET['kat'] . "/";
$handle = opendir($Pfad);
while ($file = readdir ($handle)){
if (($file != "." && $file != "..") && (!fnmatch("*.htm*", $file)) && (!fnmatch("*.html*", $file)) && (!fnmatch("*.php*", $file)) && (!fnmatch("*_th.jpg*", $file))){
$Bilder[] = $file;
}
}
closedir($handle);
if(isset($_GET['Bild'])){
$Bild = $_GET['Bild'];
}else{
$Bild = 1;
}
echo "<table width=\"600px\" cellspacing=\"5px\" border=\"0\" align=\"center\">";
echo "<tr>";
echo "<td colspan=\"3\" width=\"600px\" height=\"397px\" align=\"center\"><img src=\"" . $Pfad . $Bilder[$Bild - 1] . "\" class=\"border\" onclick=\"window.close()\"></td>";
echo "</tr><tr>";
if($Bild > 1){
echo "<td width=\"250px\" align=\"right\" class=\"text\"><a href=\"" . $_SERVER['PHP_SELF'] . "?Bild=" . ($Bild - 1) . "&kat=" . $_GET['kat'] . "\"><img src=\"../pfeil_zurueck.gif\" width=\"60\" height=\"60\" alt=\"Back\" border=\"0\"></a></td>";
}
else{
echo "<td align=\"left\" width=\"250px\"></td>";
}
echo "<td align=\"left\" width=\"100px\" class=\"text\"></td>";
if($Bild < count($Bilder)){
echo "<td width=\"250px\" align=\"left\" class=\"text\"><a href=\"" . $_SERVER['PHP_SELF'] . "?Bild=" . ($Bild + 1) . "&kat=" . $_GET['kat'] . "\"><img src=\"../pfeil_vor.gif\" width=\"60\" height=\"60\" alt=\"Next\" border=\"0\"></a></td>";
}
else{
echo "<td align=\"left\" width=\"250px\"></td>";
}
echo "</tr></table>";
?>
?>
ich bin gerade erst dabei php zu "entdecken"

das Problem ist dieses "script" liest den Ordner nach der reihe aus bzw offnet das bild wenn ich auf das richtige thumbnail drück
(thumb 2 --> bild 2 groß)
hat auf unserem altem server wunderbar geklappt aber seit das ganze system und internetseiten umgezogen ist, öffnen sich die bilder nicht mehr richtig sondern irgendwie
(thumb 2 --> bild 6 groß)
liegt das am array?
hoff ihr könnt mir noch was beibringen

grüße
my_self
Kommentar