Ankündigung

Einklappen
Keine Ankündigung bisher.

Problem mit einer auslesen.php datei

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Problem mit einer auslesen.php datei

    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

  • #2
    gott, mach' da mal bitte code-tags drum, das sieht ja furchtbar aus ohne...

    Nils aka XraYSoLo

    Kommentar


    • #3
      Kann man sich das mal in Aktion ansehen? Link?

      Kommentar


      • #4
        Zitat von DasBunny Beitrag anzeigen
        Kann man sich das mal in Aktion ansehen?
        Huch? Du ekelst Dich wohl vor überhaupt nix mehr...

        Bevor Fragen kommen:
        PHP-Code:
         <?php 
        $Bilder 
        = array();
        $Pfad "./" $_GET['kat'] . "/";
        $handle opendir($Pfad); 
        while (
        $file readdir ($handle)){
        Sowas ist Pfui - $_GET['kat'] <- die Hintertür, von der Hacker träumen

        Kommentar

        Lädt...
        X