• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Darstellungs- und include-Probleme

Status
Für weitere Antworten geschlossen.
Ist die .htaccess jetzt noch hochgeladen?

Zeig doch nochmal den Code her der index.php, da muss ja sonst noch irgendwo ein Fehler drin sein, siehe Fehlermeldung.
 
Werbung:
Code:
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<link rel="shortcut icon" href="http://www.arudc.ch/favicon.ico">
<meta name="keywords" content="Downloads, Tips, neuste RADEON-Grafikkartentreiber, Windows Vista-Infos, Viren und Malware, Stressabbau-Downloads , Musik, Browser-Downloads , Webradio, Gästebuch, Maps, Remote">
<meta name="description" content="Kostenlose Downloads und Tips f&uuml;r den PC. Rubriken: neuste RADEON-Grafikkartentreiber, Windows Vista-Infos, Viren und Malware, Stressabbau-Downloads , Musik, Browser-Downloads , Webradio, G&auml;stebuch, Maps, Remote ">
<meta name="DC.Description" content="Kostenlose Downloads und Tips f&uuml;r den PC. ">
<meta name="title" content="Alles rund um den Computer">
<meta name="language" content="German, de, deutsch">
<meta name="author" content="Mario Bienz">
<meta name="publisher" content="arudc.ch">
<meta name="copyright" content="arudc.ch">
<meta name="revisit-after" content="after 20 days">
<meta name="page-topic" content="Kostenlose Downloads und Tips f&uuml;r den PC">
<meta name="page-type" content="Gratisdownloads & Tips">
<meta name="audience" content="alle">
<meta name="robots" content="index,follow">
<meta name="generator" content="http://www.arudc.ch">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Index</title>

<link rel="stylesheet" type="text/css" href="style.css">
</head>



<div id="content">

  <?php
  if($_GET['section'] == "Home")
  { include "section/home.html"; }

  if($_GET['section'] == "Neuste Radeon Grafikkarten")
  { include "section/neuste radeon grafikkartentreiber.html"; }

  if($_GET['section'] == "Windows Vista INfos")
  { include "section/windows vista infos.html"; }

  if($_GET['section'] == "Viren und Malware")
  { include "section/viren und malware"; }

  if($_GET['section'] == "Musik")
  { include "section/Musik.html"; }

  if($_GET['section'] == "Browserdownloads")
  { include "section/browserdownloads.html"; }

  if($_GET['section'] == "Remote")
  { include "section/remote.html"; }

if($_GET['section'] == "Partner")
  { include "section/partner.html"; }

if($_GET['section'] == "Kontakt")
  { include "section/kontakt.html"; }
  ?>


</div>

</style>


<link rel="stylesheet" type="text/css" href="oben.css">



<div id="Navigation">
<h1><img src="image/titel.gif" align="middle" width="731" height="61" alt="Alles rund um den Computer"></h1>

<? php
 
<ul>
    <li><a href="home.html?section=Home"><span>Home</span></a></li>
    <li><a href="neuste radeon grafikkartentreiber?section=neuste Radeon Grafikkarten"><span>neuste Radeon Grafikkarten</span></a></li>
    <li><a href="Windows vista infos.html?section=Windows Vista Infos"><span>Windows Vista Infos</span></a></li>
    <li><a href="viren und malware.html?section=Viren und Malware"><span>Viren und Malware</span></a></li>
    <li><a href="musik.html?section=Musik"><span>Musik</span></a></li>
    <li><a href="browserdownloads.html?section=Browserdownloads"><span>Browserdownloads</span></a></li>
    <li><a href="remote.html?section=Remote"><span>Remote</span></a></li>
    <li><a href="partner.html?section=Partner"><span>Partner</span></a></li>
    <li><a href="kontakt.html?section=Kontakt"><span>Kontakt</span></a></li>

</ul>
  ?>  


<div style="margin-top:30px;">
<!-- Beginn Bannercode submitter.de -->
<a href="http://www.submitter.de" target="new" align="middle">
<IMG SRC="http://www.submitter.de/banner/banner1.gif" NOSAVE BORDER=0 HEIGHT=50 WIDTH=200 ALT="submitter.de - Kostenloser Eintrag in &uuml;ber 1111 Suchmaschinen!"></a>
<!-- Ende Bannercode submitter.de -->
</div>
 </div>



<!-- Counter von http://fc.webmasterpro.de : dieser Code zeigt ihre Besucherzahl an und zählt mit -->
<script type="text/javascript" src="http://fc.webmasterpro.de/counter.php?name=mario348&amp;style=none" id="fcScriptmario348"></script>
<noscript>
 <div>
  <img src="http://fc.webmasterpro.de/as_noscript.php?name=mario348" alt="" />
 </div>
  </noscript>



</style>



<body>
</body>
</html>
 
Werbung:
Habe den Code noch mit dem Validator überprüft. In Linie 76 wurde nicht einmal ein Fehler gefunden, obwohl es jedoch in der Fehlermeldung angezeigt wurde...
 
Habe den Code noch mit dem Validator überprüft. In Linie 76 wurde nicht einmal ein Fehler gefunden, obwohl es jedoch in der Fehlermeldung angezeigt wurde...

Er ist voller Fehler.

Alles, was mit Styleangaben, Meta-Tags, Verlinkung von Stylesheets zu tun hat kommt in den Head-Bereich rein.

Nachdem der Head geschlossen wurde folgt sofort der öffnende Body-Tag.
Dazwischen kommt nichts!

Alle Inhalte kommen ausschließlich in den Body, weder in den head, noch zwischen Head und Body rein.

Deine Fehler sind rot markiert.
Zumindest alle, die ich so spontan entdeckt habe.

Code:
 [B][COLOR=Red]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/TR/html4/frameset.dtd">[/COLOR][/B]
<html>
<head>
<link rel="shortcut icon" href="http://www.arudc.ch/favicon.ico">
<meta name="keywords" content="Downloads, Tips, neuste RADEON-Grafikkartentreiber, Windows Vista-Infos, Viren und Malware, Stressabbau-Downloads , Musik, Browser-Downloads , Webradio, Gästebuch, Maps, Remote">
<meta name="description" content="Kostenlose Downloads und Tips f&uuml;r den PC. Rubriken: neuste RADEON-Grafikkartentreiber, Windows Vista-Infos, Viren und Malware, Stressabbau-Downloads , Musik, Browser-Downloads , Webradio, G&auml;stebuch, Maps, Remote ">
<meta name="DC.Description" content="Kostenlose Downloads und Tips f&uuml;r den PC. ">
<meta name="title" content="Alles rund um den Computer">
<meta name="language" content="German, de, deutsch">
<meta name="author" content="Mario Bienz">
<meta name="publisher" content="arudc.ch">
<meta name="copyright" content="arudc.ch">
<meta name="revisit-after" content="after 20 days">
<meta name="page-topic" content="Kostenlose Downloads und Tips f&uuml;r den PC">
<meta name="page-type" content="Gratisdownloads & Tips">
<meta name="audience" content="alle">
<meta name="robots" content="index,follow">
<meta name="generator" content="http://www.arudc.ch">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Index</title>

<link rel="stylesheet" type="text/css" href="style.css">
</head>

[B][COLOR=Red]<!-- Kommentar von Maxi: Hier fehlt der öffnende Body-Tag -->[/COLOR][/B]

<div id="content">

  <?php
  if($_GET['section'] == "Home")
  { include "section/home.html"; }

  if($_GET['section'] == "Neuste Radeon Grafikkarten")
  { include "section/neuste radeon grafikkartentreiber.html"; }

  if($_GET['section'] == "Windows Vista INfos")
  { include "section/windows vista infos.html"; }

  if($_GET['section'] == "Viren und Malware")
  { include "section/viren und malware"; }

  if($_GET['section'] == "Musik")
  { include "section/Musik.html"; }

  if($_GET['section'] == "Browserdownloads")
  { include "section/browserdownloads.html"; }

  if($_GET['section'] == "Remote")
  { include "section/remote.html"; }

if($_GET['section'] == "Partner")
  { include "section/partner.html"; }

if($_GET['section'] == "Kontakt")
  { include "section/kontakt.html"; }
  ?>


</div>
[B][COLOR=Red]
</style>


<link rel="stylesheet" type="text/css" href="oben.css">[/COLOR][/B]  



<div id="Navigation">
<h1><img src="image/titel.gif" align="middle" width="731" height="61" alt="Alles rund um den Computer"></h1>

[B][COLOR=Red] <? php[/COLOR][/B]
 
<ul>
    <li><a href="home.html?section=Home"><span>Home</span></a></li>
    <li><a href="neuste radeon grafikkartentreiber?section=neuste Radeon Grafikkarten"><span>neuste Radeon Grafikkarten</span></a></li>
    <li><a href="Windows vista infos.html?section=Windows Vista Infos"><span>Windows Vista Infos</span></a></li>
    <li><a href="viren und malware.html?section=Viren und Malware"><span>Viren und Malware</span></a></li>
    <li><a href="musik.html?section=Musik"><span>Musik</span></a></li>
    <li><a href="browserdownloads.html?section=Browserdownloads"><span>Browserdownloads</span></a></li>
    <li><a href="remote.html?section=Remote"><span>Remote</span></a></li>
    <li><a href="partner.html?section=Partner"><span>Partner</span></a></li>
    <li><a href="kontakt.html?section=Kontakt"><span>Kontakt</span></a></li>

</ul>
[B][COLOR=Red]   ?>  [/COLOR][/B]


<div style="margin-top:30px;">
<!-- Beginn Bannercode submitter.de -->
<a href="http://www.submitter.de" target="new" align="middle">
<IMG SRC="http://www.submitter.de/banner/banner1.gif" NOSAVE BORDER=0 HEIGHT=50 WIDTH=200 ALT="submitter.de - Kostenloser Eintrag in &uuml;ber 1111 Suchmaschinen!"></a>
<!-- Ende Bannercode submitter.de -->
</div>
 </div>



<!-- Counter von http://fc.webmasterpro.de : dieser Code zeigt ihre Besucherzahl an und zählt mit -->
<script type="text/javascript" src="http://fc.webmasterpro.de/counter.php?name=mario348&amp;style=none" id="fcScriptmario348"></script>
<noscript>
 <div>
  <img src="http://fc.webmasterpro.de/as_noscript.php?name=mario348" alt="" />
 </div>
  </noscript>


[B][COLOR=Red]
</style>[/COLOR][/B]



[B][COLOR=Red] <body>
</body>[/COLOR][/B]
</html>
 
Dann kommt die CSS Verlinkung von diesem Ausschnitt hier auch in den <head>?

Code:
</style>


<link rel="stylesheet" type="text/css" href="oben.css">



<div id="Navigation">
<h1><img src="image/titel.gif" align="middle" width="731" height="61" alt="Alles rund um den Computer"></h1>

<? php
 
<ul>
    <li><a href="home.html?section=Home"><span>Home</span></a></li>
    <li><a href="neuste radeon grafikkartentreiber?section=neuste Radeon Grafikkarten"><span>neuste Radeon Grafikkarten</span></a></li>
    <li><a href="Windows vista infos.html?section=Windows Vista Infos"><span>Windows Vista Infos</span></a></li>
    <li><a href="viren und malware.html?section=Viren und Malware"><span>Viren und Malware</span></a></li>
    <li><a href="musik.html?section=Musik"><span>Musik</span></a></li>
    <li><a href="browserdownloads.html?section=Browserdownloads"><span>Browserdownloads</span></a></li>
    <li><a href="remote.html?section=Remote"><span>Remote</span></a></li>
    <li><a href="partner.html?section=Partner"><span>Partner</span></a></li>
    <li><a href="kontakt.html?section=Kontakt"><span>Kontakt</span></a></li>

</ul>
  ?>  


<div style="margin-top:30px;">
<!-- Beginn Bannercode submitter.de -->
<a href="http://www.submitter.de" target="new" align="middle">
<IMG SRC="http://www.submitter.de/banner/banner1.gif" NOSAVE BORDER=0 HEIGHT=50 WIDTH=200 ALT="submitter.de - Kostenloser Eintrag in &uuml;ber 1111 Suchmaschinen!"></a>
<!-- Ende Bannercode submitter.de -->
</div>
 </div>



<!-- Counter von http://fc.webmasterpro.de : dieser Code zeigt ihre Besucherzahl an und zählt mit -->
<script type="text/javascript" src="http://fc.webmasterpro.de/counter.php?name=mario348&amp;style=none" id="fcScriptmario348"></script>
<noscript>
 <div>
  <img src="http://fc.webmasterpro.de/as_noscript.php?name=mario348" alt="" />
 </div>
  </noscript>



</style>
 
Werbung:
Werbung:
1. Welchen Doctype muss ich verwenden?
2. Wo kommten der öffnende und der schliessende PHP Tag hin?
 
Beim Menü brauchst du die beiden PHP-Tags nicht, nur da, wo du auch PHP-Code verwendest.


Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
 
Werbung:
In deiner Navigation ist kein PHP-Code enthalten.
Das sind nur die Links zu den Unterseiten.
Nur weil die ein .php drinhaben ist es hier noch kein PHP-Code.
 
Du musst die Endung .php verwenden! Das hab ich doch schon vorher gesagt! Und deine Links müssen immer in der Form <a href="index.php?section=beispiel">...</a> sein.

Code:
[U]Falsch:[/U]
<a href="[COLOR=Red]home.html[/COLOR]?section=Home">Home</a>
<a href="[COLOR=Red]neuste radeon grafikkartentreiber[/COLOR]?section=neuste Radeon Grafikkarten">neuste Radeon Grafikkarten</a>
<a href="[COLOR=Red]Windows vista infos.html[/COLOR]?section=Windows Vista Infos">Windows Vista Infos</a>
<a href="[COLOR=Red]viren und malware.html[/COLOR]?section=Viren und Malware"><span>Viren und Malware</a>
<a href="[COLOR=Red]musik.html?section=Musik[/COLOR]">Musik</a>
<a href="[COLOR=Red]browserdownloads.html[/COLOR]?section=Browserdownloads">Browserdownloads</a>
<a href="[COLOR=Red]remote.html[/COLOR]?section=Remote">Remote</a>
<a href="[COLOR=Red]partner.html[/COLOR]?section=Partner">Partner</a>
<a href="[COLOR=Red]kontakt.html[/COLOR]?section=Kontakt">Kontakt</a>

[U]Richtig:[/U]
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Home">Home</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=neuste Radeon Grafikkarten">neuste Radeon Grafikkarten</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Windows Vista Infos">Windows Vista Infos</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Viren und Malware"><span>Viren und Malware</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR][COLOR=Black]?section=Musik[/COLOR]">Musik</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Browserdownloads">Browserdownloads</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Remote">Remote</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Partner">Partner</a>
<a href="[COLOR=YellowGreen]index.php[/COLOR]?section=Kontakt">Kontakt</a>
Code:
[U]Falsch:[/U]
<?php
if($_GET['section'] == "beispiel")
{ include "section.[COLOR=Red]html[/COLOR]"; }
?>

[U]Richtig:[/U]
<?php
if($_GET['section'] == "beispiel")
{ include "section.[COLOR=YellowGreen]php[/COLOR]"; }
?>
 
Zuletzt bearbeitet:
Werbung:
... was an den restlichen Fehlern liegen könnte, oder hast du die etwa schon alle behoben?
Poste doch den aktuellen Code nochmal.

@ assmaje
HTML-Dateien können meines wissens nach schon per include in eine PHP-Datei eingefügt werden (also mit der Endung .html), hat bei mir bisher jedenfalls immer gut geklappt.
 
Den Doctype habe ich übrigens in allen Dokumenten, die in der Navigation aufgelilstet sind, geändert.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="shortcut icon" href="http://www.arudc.ch/favicon.ico">
<meta name="keywords" content="Downloads, Tips, neuste RADEON-Grafikkartentreiber, Windows Vista-Infos, Viren und Malware, Stressabbau-Downloads , Musik, Browser-Downloads , Webradio, Gästebuch, Maps, Remote">
<meta name="description" content="Kostenlose Downloads und Tips f&uuml;r den PC. Rubriken: neuste RADEON-Grafikkartentreiber, Windows Vista-Infos, Viren und Malware, Stressabbau-Downloads , Musik, Browser-Downloads , Webradio, G&auml;stebuch, Maps, Remote ">
<meta name="DC.Description" content="Kostenlose Downloads und Tips f&uuml;r den PC. ">
<meta name="title" content="Alles rund um den Computer">
<meta name="language" content="German, de, deutsch">
<meta name="author" content="Mario Bienz">
<meta name="publisher" content="arudc.ch">
<meta name="copyright" content="arudc.ch">
<meta name="revisit-after" content="after 20 days">
<meta name="page-topic" content="Kostenlose Downloads und Tips f&uuml;r den PC">
<meta name="page-type" content="Gratisdownloads & Tips">
<meta name="audience" content="alle">
<meta name="robots" content="index,follow">
<meta name="generator" content="http://www.arudc.ch">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Index</title>

<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="oben.css">
</head>
<body>


<div id="content">

  <?php
  if($_GET['section'] == "Home")
  { include "section/home.php"; }

  if($_GET['section'] == "Neuste Radeon Grafikkarten")
  { include "section/neuste radeon grafikkartentreiber.php"; }

  if($_GET['section'] == "Windows Vista INfos")
  { include "section/windows vista infos.php"; }

  if($_GET['section'] == "Viren und Malware")
  { include "section/viren und malware"; }

  if($_GET['section'] == "Musik")
  { include "section/Musik.php"; }

  if($_GET['section'] == "Browserdownloads")
  { include "section/browserdownloads.php"; }

  if($_GET['section'] == "Remote")
  { include "section/remote.php"; }

if($_GET['section'] == "Partner")
  { include "section/partner.php"; }

if($_GET['section'] == "Kontakt")
  { include "section/kontakt.php"; }
  ?>


</div>



<div id="Navigation">
<h1><img src="image/titel.gif" align="middle" width="731" height="61" alt="Alles rund um den Computer"></h1>


 
<ul>
    <li><a href="home.php?section=Home"><span>Home</span></a></li>
    <li><a href="neuste radeon grafikkartentreiber?section=neuste Radeon Grafikkarten"><span>neuste Radeon Grafikkarten</span></a></li>
    <li><a href="Windows vista infos.php?section=Windows Vista Infos"><span>Windows Vista Infos</span></a></li>
    <li><a href="viren und malware.php?section=Viren und Malware"><span>Viren und Malware</span></a></li>
    <li><a href="musik.php?section=Musik"><span>Musik</span></a></li>
    <li><a href="browserdownloads.php?section=Browserdownloads"><span>Browserdownloads</span></a></li>
    <li><a href="remote.php?section=Remote"><span>Remote</span></a></li>
    <li><a href="partner.php?section=Partner"><span>Partner</span></a></li>
    <li><a href="kontakt.php?section=Kontakt"><span>Kontakt</span></a></li>

</ul>



<div style="margin-top:30px;">
<!-- Beginn Bannercode submitter.de -->
<a href="http://www.submitter.de" target="new" align="middle">
<IMG SRC="http://www.submitter.de/banner/banner1.gif" NOSAVE BORDER=0 HEIGHT=50 WIDTH=200 ALT="submitter.de - Kostenloser Eintrag in &uuml;ber 1111 Suchmaschinen!"></a>
<!-- Ende Bannercode submitter.de -->
</div>
 </div>



<!-- Counter von http://fc.webmasterpro.de : dieser Code zeigt ihre Besucherzahl an und zählt mit -->
<script type="text/javascript" src="http://fc.webmasterpro.de/counter.php?name=mario348&amp;style=none" id="fcScriptmario348"></script>
<noscript>
 <div>
  <img src="http://fc.webmasterpro.de/as_noscript.php?name=mario348" alt="" />
 </div>
  </noscript>



</body>
</html>
 
Zu den Leerzeichen in den Dateinamen hab ich auch schonmal was geschrieben - weg damit!

Die Links in der Navigation sind alle Falsch.

Es heißt immer index.php?section=
 
Werbung:
Zu den Leerzeichen in den Dateinamen hab ich auch schonmal was geschrieben - weg damit!

Die Links in der Navigation sind alle Falsch.

Es heißt immer index.php?section=
Jop, dann müssts gehen (siehe mein obiger Post).

P.S.:
Maxi schrieb:
HTML-Dateien können meines wissens nach schon per include in eine PHP-Datei eingefügt werden (also mit der Endung .html), hat bei mir bisher jedenfalls immer gut geklappt.
Sicher ist sicher. ;)
 
Status
Für weitere Antworten geschlossen.
Zurück
Oben