include funktioniert nicht
-
-
gibts keine fehlermeldung: fipsii.de/hauptseite.html
-
Du musst der Datei schon eine Endung geben, die PHP auch interpretieren kann, also z.B. php.
Sonst funktioniert gar nichts.
Und als Anmerkung:
Dein HTML-Code ist semantisch nicht korrekt. Google mal nach Webstandarts, wenn du noch nichts davon gehört hast. -
die hat ja ne endung? (html?)
-
Die sollte aber eigentlich .php lauten.
-
ok, cih änders schnell und meld mcih zurück
-
ich glaub, mein schwein pfeift... mit php funktioniert das alles oO
-
War ja klar. Wenn du nicht in der htaccess oder sonstwo extra angibst, dass der PHP-Interpreter auch html-Dateien interpretieren soll, dann wird er das auch nicht tun.
Sorry, aber das sollte man doch ganz am Anfang schon lernen!? -
so, mal wieder ein problem... und zwar:
ich hab nen index gemacht... der funktioniert auch... und jez wollte ich ne andere seite machen (hab den copde exakt kopiert, außer externe css-verlinkung, titel und angezeigten text). Doch leider wird ncihts angezeigt, außer dne text, den ich eingegeben habe...
Datei:
fipsii.de/index.php (erste Datei)
Quellcode
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Startseite - Fipsi's Server</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link href="data/templates/css/haupt-css.css" type="text/css" rel="stylesheet" />
- <link rel="Stylesheet" type="text/css" href="data/templates/css/index.css" />
- </head>
- <body>
- <div id="header">
- <?php
- include ("data/templates/header.html");
- ?>
- </div>
- <div id="mitte">
- <div id="haupt">
- <div id="h1">Herzlich Willkommen auf Fipsi's Server!</div><br /><br />
- <p>Endlich! Es ist soweit: der neue Style der Website ist so gut wie fertig. Ein paar feinheiten werden zwar noch verändert werden müssen, doch ist alles webbereit. Es fehlen zwar noch so gut wie alle Seiten auf dieser Website, aber Rom wurde ja auch nicht an einem Tag erbaut;) <br />Viel Spaß und Informationen auf dieser Seite.</p><br /> <br />
- <p>Liebe Grüße <br /><br />Fipsi und Team</p>
- </div>
- <div id="navi">
- <?php
- include ("data/templates/start-navi.html");
- ?>
- </div>
- <div id="rechts">
- <?php
- include ("data/templates/rechts.php");
- ?></div>
- </div>
- <div id="footer">
- <?php
- include ("data/templates/footer.html");
- ?>
- </div>
- </body>
- </html>
Datei:
fipsii.de/news/index.php (beachte das "/news/")
Quellcode
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>News - Fipsi's Server</title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link href="/data/templates/css/haupt-css.css" type="text/css" rel="stylesheet" />
- <link rel="Stylesheet" type="text/css" href="/data/templates/css/news.css" />
- </head>
- <body>
- <div id="header">
- <?php
- include ("/data/templates/header.html");
- ?>
- </div>
- <div id="mitte">
- <div id="haupt">
- <div id="h1">News</div><br /><br />
- <p>News gibt es auf eigentlich jeder Seite, so also auch bei uns. Wnen sich etwas weitlegendes auf dieser Website verändert, dann steht es hier und im <a href="/forum/">Forum</a>.</p><br /> <br />
- </div>
- <div id="navi">
- <?php
- include ("/data/templates/start-navi.html");
- ?>
- </div>
- <div id="rechts">
- <?php
- include ("/data/templates/rechts.php");
- ?></div>
- </div>
- <div id="footer">
- <?php
- include ("/data/templates/footer.html");
- ?>
- </div>
- </body>
- </html>
Wie gesagt, eben fast genau die selben...
nur funktioniert der letzte eben nicht... ich hab mal was ausprobiert, was zwar funktioniert, ich aber nicht haben will:
Wie gesasgt, das funktioniert, doch ich will das nicht haben.
Kann mir da jemand weiterhelfen?
LG
Fipsi -
pokertom schrieb:
Hier spielen dir wieder die Foreslashes einen Streich.
In ein höheres Verzeichnis wechselst du mit »..«, demnach müssten deine Pfadangaben hier in etwa so lauten: ../data/templates/xyz.html -
wenn du mal genau hinguckst: das hab ich gemacht... (sry, vergessen aufzuzählen^^)
-
Du solltest noch einmal genau hinsehen.
-
ich versteh ehrlich gesagt nicht genau,w as du meinst... weil cih hab ja alle "/data/[...]" gemacht...
-
Bei mir sind da aber zwei Punkte davor, oder?
-
m( aso, entschuldigung, jez versteh ichs... und jez funktionierts auch^^ herzlichen Dank...:)
-
so... es funktioniert halb, halb... bei mir wird es komplett angezeigt... allerdings bei meinen Freunden nicht... da ist nur das mittlere zu sehen... ist es bei euch auch so?: fipsii.de/news
So sollte es eigentlich aussehen (also so sieht es bei mir aus):
[Blockierte Grafik: http://fipsii.de/data/pic/news.jpg]
Und noch komischer ist, ich hab eine Newsseite schon, aber bei dne anderen steht, die gibts nicht... oO fipsii.de/news/seite1.php
Ich hoffe, ihr könnt mir helfen
Edit: was mir aufgefallen ist, wenn ich das www. mit dazu schreib, dann wirds bei mir auch flasch, bzw. nich angezeigt... aber bei den anderen wirds auch ohne falsch angezeigt... ich verstehs nich... -
hm... laut hoster wurde resettet (was auch erklärt, warum die dateien nimmer drauf sind), und jetzt funktioniert wieder alles... also hat sich erledigt;)