Ergebnis 1 bis 7 von 7

Thema: seltasamer Fehler "on line 68"

  1. #1

    seltasamer Fehler "on line 68"

    Hallo,
    joar hab nen komischen fehler http://daeg.pyrokar.lima-city.de/wbblite/pic.php stehd ganz unten.
    irgend was auf Zeile 68.
    aber da ist nichts, weil es keine zeile 68 gibt oO
    PHP-Code:
    <?php
    $filename
    ="pic.php";

    require(
    "./global.php");

    eval(
    "\$tpl->output(\"".$tpl->get("pic")."\");");
    eval(
    "\$tpl->output(\"".$tpl->get("upload")."\");");
    ?>
    Hilfe?!>.>

    Bitte keine kommentar zu dem Forum>.>

  2. #2
    Ich vermute, PHP zählt die Zeilen der global.php mit. Und dann ist eben irgendein Fehler in dem Code, den du mit eval() ausführst. Was genau, kann ich dir auch nicht sagen, wahrscheinlich irgendwas aus $tpl->get()

  3. #3
    also könnte ein Fehler in pic.tpl oder upload.tpl sein?!
    der auf "line 68" ist?!
    also bei pic.tpl ist nichts auf line 68...ich schau mal bei upload.tpl

    edit: so jetzt ist was auf "line 59"
    Zitat Zitat
    Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/webpages/lima-city/daeg/html/wbblite/pic.php(7) : eval()'d code on line 59

  4. #4
    Wenn du dir die Fehlermeldung genau ansehen würdest, erkänntest du, dass die Zeile 59 des Codes der eval()uiert gemeint ist: "eval()'d code on line 59".

    eval() ist immer so ne Sache. Recht fehleranfällig. Ich würde dir empfehlen, zum Test mal deinen eval()uierten Code auszugeben. Also folgendes zu machen:
    PHP-Code:
    <?php
    $filename
    ="pic.php";

    require(
    "./global.php");

    echo(
    "\$tpl->output(\"".$tpl->get("pic")."\");");
    echo 
    "<hr/>\n";
    echo(
    "\$tpl->output(\"".$tpl->get("upload")."\");");
    ?>
    Dann siehst du vielleicht wo der Fehler ist.

  5. #5
    hem...nein leider nicht ist nichts anders ich seh nicht wo das problem ligen könnte sry
    edit:nun wieder so wie vorher :P

    Geändert von Oliver (05.11.2005 um 22:49 Uhr)

  6. #6
    Versuch mal, die Variablen im String, den du mit eval ausführst, vorher durch addslashes() zu jagen

  7. #7
    hemm..ich weiss nicht genau aber hat nichts gebracht...naja werd ih noch mal alles neu machen und dann werd ich den Fehler schon finden...
    danke, trotz dem

    Edit:
    vieleicht könnt ihr mir helfen wenn ich mal den quelltext von pic.tpl und uplad.tpl rein setzte
    Pic.tpl:
    Code:
    {!DOCTYPE}
    <html>
    <head>
    <title>$master_board_name - Image Upload</title>
    $headinclude
    
    
    
    </head>
    
    <body id="bg">
     $header
     <tr bgcolor="{tablecolora}" id="tablea">
      <td><table cellpadding=0 cellspacing=0 border=0 width="100%">
       <tr>
        <td><smallfont><b><a href="index.php?sid=$session[hash]">$master_board_name</a> » Add It</b></font></td>
        <td align="right"><smallfont><b>$usercbar</b></font></td>
       </tr>
      </table></td>
     </tr>
    </table>
    <normalfont>Willkommen  beim Image Upload von Little Fighter !</normalfont><br>
    <p>
    <font color="#FF0000">
    <smalfont>Wichtiger Hinweise/Regeln für den Image Upload!<br></font>
    <br />
        * es sind keine Pornografischen/illegalen Bilder<br />
    
        * die Bilder dürfen nicht größer als 2mb sein<br />
    
        * es ist egal wie viel pixel ob 100x100 oder 1024x768 Pixel<br />
    
    <br />
    <br />
    <br />
    
    <div align="center">
      <form action="upload.tpl" method="post" enctype="multipart/form-data" name="imgform">
        <table width="350" border="0" cellspacing="0" cellpadding="0" style="border: #FFFFFF 1px solid">
          <tr>
            <td style="border-bottom: #FFFFFF 1px solid"><img src="image/titel2.gif" alt="Add It Logo" width="350" height="100"></td>
          </tr>
          <tr>
            <td><table width="350" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="30%">&nbsp;</td>
                  <td width="70%">&nbsp;</td>
                </tr>
                <tr>
                  <td width="30%">&nbsp;Bild w&auml;hlen:</td>
                  <td width="70%"><div align="left">
                    <input name="file" type="file" id="file" size="15" style="font-size: 12px; font-weight: bold; font-style: italic;">
                  </div></td>
                </tr>
                <tr>
                  <td width="30%">&nbsp;</td>
                  <td width="70%"><input name="submit" type="image" id="submit" src="image/upload.gif"></td>
                </tr>
                <tr>
                  <td width="30%">&nbsp;</td>
                  <td width="70%">&nbsp;</td>
                </tr>
                <tr>
                  <td width="30%"><nobr>&nbsp;Max. Dateigr&ouml;&szlig;e:</nobr></td>
                  <td width="70%">2048 Kilobyte </td>
                </tr>
                <tr>
                  <td width="30%"><nobr>&nbsp;Dateitypen:</nobr></td>
                  <td width="70%">.gif , .jpg , .jpeg, .png, .bmp</td>
                </tr>
                <tr>
                  <td width="30%">&nbsp;</td>
                  <td width="70%">&nbsp;</td>
                </tr>
    
            </table></td>
          </tr>
        </table>
      </form>
      </td>
    
    </div>
    
    
    
    
      </td>
     </tr>
    </table>
    <p>$footer
    </p>
    </body>
    </html>
    upload.tpl:
    Code:
    {!DOCTYPE}
    <html>
    <head>
    <title>$master_board_name - Image Upload</title>
    $headinclude
    
    </head>
    
    <body id="bg">
     $header
     <tr bgcolor="{tablecolora}" id="tablea">
      <td><table cellpadding=0 cellspacing=0 border=0 width="100%">
       <tr>
        <td><smallfont><b><a href="index.php?sid=$session[hash]">$master_board_name</a> » Add It</b></font></td>
        <td align="right"><smallfont><b>$usercbar</b></font></td>
       </tr>
      </table></td>
     </tr>
    </table>
    <normalfont>Willkommen  beim Image Upload von Little Fighter !</normalfont><br>
    <p>
    <font color="#FF0000">
    <smalfont>Wichtiger Hinweise/Regeln für den Image Upload!<br></font>
    <br />
        * es sind keine Pornografiischen/illegalen Bilder<br />
    
        * die Bilder dürfen nicht größer als 2mb sein<br />
    
        * es ist egal wie viel pixel ob 100x100 oder 1024x768 Pixel<br />
    
        <br />
    <br />
    <br />
    
    
    <table width="350" border="0" align="center" cellpadding="0" cellspacing="0" style="border: #FFFFFF 1px solid">
      <tr>
        <td style="border-bottom: #FFFFFF 1px solid"><img src="image/titel2.gif" alt="Add It Logo" width="350" height="100"></td>
      </tr>
      <tr>
        <td><table width="350" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="10">&nbsp;</td>
            <td width="330">&nbsp;</td>
            <td width="10">&nbsp;</td>
          </tr>
          <tr>
            <td width="10">&nbsp;</td>
            <td width="330"><div align="left"><?
    function GenerateVFolder() {
    return(str_replace(".", "",microtime()));
    }
    function GenerateName($namefile) {
    $zufall = rand(1, 9);
    $zufall .= rand(1, 9);
    $zufall .= rand(1, 9);
    return("$zufall$namefile");
    }
    $filename = $_FILES['file']['name'];
    $size = $_FILES['file']['size'];
    $tmpname = $_FILES['file']['tmp_name'];
    $type = $_FILES['file']['type'];
    if($filename == "") {
            $fehler .= "Keine Gewählte Datei! <br>"; }
    if($type != "image/pjpeg" and $type != "image/jpeg" and $type != "image/gif" and $type != "image/bmp" and $type != "image/png" and !$fehler) {
            $fehler .= "Kein Erlaubter Dateityp! <br>"; }
    if($size > "2097152") {
            $fehler .= "Datei zu Groß! <br>"; }
    if(!$fehler) {
            $folder = GenerateVFolder();
            $newname = GenerateName($filename);
            move_uploaded_file($tmpname, "img/$folder$newname");
            echo("Die Datei wurde hochgeladen und ist nun Unter folgendem Link abrufbar:");
            $file = str_replace("upload.tpl", "img/$folder$newname", $_SERVER['PHP_SELF']);
            $link = "http://".$_SERVER['HTTP_HOST'].$file;
            echo("<br> <input type='text' value='$link' size='50'/>");
    } else {
            echo "<b>Fehler:</b> <br /> $fehler"; }
    ?></div></td>
            <td width="10">&nbsp;</td>
          </tr>
          <tr>
            <td width="10">&nbsp;</td>
            <td width="330"><a href="pic.tpl">Zur&uuml;ck</a></td>
            <td width="10">&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
    
    
        </table></td>
      </tr>
    </table>
    
    </p>
    
      </td>
     </tr> 
    </table>
    <p>$footer
    </p>
    </body>
    </html>

    Geändert von Oliver (07.11.2005 um 13:07 Uhr)

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •