[Funktion] scriptfehler-datei einlesen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Funktion] scriptfehler-datei einlesen

    hi

    ich bin noch ziemlich am anfang, was php angeht und hab gleich ein riesenproblem.
    aber bisher konnte mir noch keiner helfen...
    meine seite bleibt bei dem folgenden script einfach weiss und ich weis nicht wieso :-/

    fb.php
    PHP Code:
    <html>
    <HEAD>
    <style type="text/css">
      a:link { text-decoration:none; color:#ffffff; }
      a:visited { text-decoration:none; color:#ffffff; }
      a:hover { text-decoration:underline; color:#ffffff; }
      a:active { text-decoration:none; color:#ffffff; }
    td.withe { background-color:#2E2E2E; }
    td.withe2 { background-color:#3c3c3c; }
    td.blue { background-color:#000000; }
    </style>
    <meta name="author" content="Mindkeeper">
    <meta name="generator" content="Notepad">
    <meta name="robots" content="noindex"> 
    </HEAD>
    <BODY bgcolor="#333333" text="#ffffff">

    <table>
    <tr>
    <td><br><br><br></td>
    </tr>
    </table>

    <table width="400" align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <colgroup width="55%">
    <colgroup width="15%">
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr><td width=320 class=blue><b>&nbsp;Produkt</b></td><td width=80 class=blue><b>&nbsp;Qualit&auml;t</b></td></tr>


    fb.php
    <?php


    $msg 
    file('fb.txt');
     
    var_dump($msg);


    foreach (
    $msg as $line) { 
       
    $rest1 substr($line), 0, -3); 
       
    $rest2 substr($line), -3, -1); 
       echo 
    "<tr><td align='center' width='320' class='withe2'>"$rest1 ."<br></td>\n"
       echo 
    "<td align='center' width='320' class='withe'>"$rest2 ."<br></td></tr>\n"
    }

    ?>


    </table>
    </table>
    </BODY>
    </HTML>
    fb.txt
    PHP Code:
    Kakaopulver    2    
    Wolle    2    
    Schokoriegel    3    
    Wein    3    
    Kaffeepulver    3    
    Lederjacken    3    
    Kakao    3    
    Pullover    5_ 

  • #2
    Hast du denn schon geschaut, ob in $msg was drin steht? Weil wenn nicht, gibt es auch keine Ausgabe ...

    Comment

    Working...
    X