[PHP5] Cannot modify header information

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

  • [PHP5] Cannot modify header information

    Hallo Leute!

    Nicht schimpfen, dass es so viele Beträge zu diesem Thema existieren. Ich habe den Stick-thread gelesen und habe gegoogelt was das zeug hält. Bin aber immer noch nicht weiter... Ich weiss warum dieses Problem auftaucht, finde bei mir aber kein Fehler!

    meine Fehlermeldung:

    Warning: Cannot modify header information - headers already sent by (output started at C:\Programme\xampp\htdocs\homepage2\index.php:13) in C:\Programme\xampp\htdocs\homepage2\test.php on line 2


    in der test.php steht nur dieser code

    PHP-Code:
    <?php
    header
    ("Location: [url]http://localhost/homepage/index.php?action=news[/url]");
    ?>

    und das ist die index.php

    PHP-Code:
    <?php
    //Includen der Config
    include "config.php";
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
            <title>Eddy</title>
            <link href="inc/seite.css" rel="stylesheet" type="text/css">
        </head>
        <body>
            <table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td colspan="3" align="center" valign="top">
                        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="800" height="82">
                        <param name="movie" value="img/top.swf">
                        <param name="quality" value="high">
                        <embed src="img/top.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="800" height="82"></embed>
                        </object>
                    </td>
                </tr>
                <tr>
                    <td width="86" align="center" valign="top"></td>
                    <td width="641" align="center" valign="top"><img src="img/menue.jpg" width="641" height="105" border="0" usemap="#Home_Button"></td>
                    <td width="73" align="center"valign="top"></td>
                </tr>
                <tr>
                    <td align="center" valign="top"></td>
                    <td align="center" valign="top"><img src="img/ueberschrift.jpg" width="641" height="54"></td>
                    <td align="center" valign="top"></td>
                </tr>
                <tr>
                    <td align="center" valign="top"></td>
                    <td align="center" valign="top" background="img/bg.jpg">
                        <table width="582" height="100%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="360" align="center" valign="top">
                                    <?php
                                        
    //Include-Script
                                        
    switch($_REQUEST["action"])
                                        {
                                            
    //Fall 1.
                                            
    case "news_view":
                                                include 
    "news_view.php";
                                            break;
                                        
                                            case 
    "news_add":
                                                include 
    "news_add.php";
                                            break;
                                        
                                            case 
    "test":
                                                include 
    "test.php";
                                            break;
                                        
                                            default:
                                                include 
    "news_view.php";
                                            break;
                                        }
                                    
    ?>
                                </td>
                                <td width="222" align="center" valign="top"></td>
                            </tr>
                        </table>
                    </td>
                    <td align="center" valign="top"></td>
                </tr>
                <tr>
                    <td align="center" valign="top"></td>
                    <td align="center" valign="top">
                        <img src="img/boden.jpg" width="641" height="123">
                    </td>
                    <td align="center" valign="top"></td>
                </tr>
            </table>
        </body>
    </html>
    bitte um hilfe! sitze schon paar tage dran...

    danke!!! mfg ingredy

  • #2
    Re: [PHP5] Cannot modify header information

    Regeln lesen, Code umbrechen.
    I don't believe in rebirth. Actually, I never did in my whole lives.

    Kommentar


    • #3
      ...und dann den sticky noch mal lesen.
      und zwar so lange, bis du verstehst, was "keinerlei ausgabe vor einem header" bedeutet.

      Kommentar

      Lädt...
      X