anja: PHP-Seite erstellen.

Beitrag lesen

Hallo!

Ich habe auf einer Seite diese tolle Anleitung gefunden, wie man als absoluter Anfänger seine Seite als php-Datei erstellen kann.
Ich nutze das schon länger, bin zufrieden damit und für meine Zwecke reichts.

So sieht es aus:

<?php

//Copy and paste the HTML that is the same in all your pages (the header and footer) into new files and name them header.inc and footer.inc.
//They will be included at the complete top and bottom of your pages, so you will only have to edit these 2 files if you want to change your layout.

include('header.inc');

if(!$_SERVER['QUERY_STRING']) { ?>

//Paste here the HTML coding you have on your main page. This is what people will see when they go to index.php, without any ?section bit after it.

<? } elseif ($_SERVER['QUERY_STRING'] == "about") { ?>
//Paste here your HTML code on the About page (without the header and footer code, obviously).

<? } elseif ($_SERVER['QUERY_STRING'] == "rules") { ?>
//Paste here your HTML code on the Rules page (without the header and footer code, obviously).

<? } elseif ($_SERVER['QUERY_STRING'] == "join") { ?>
//Paste here your HTML code on the Join page (without the header and footer code, obviously).

<? } elseif ($_SERVER['QUERY_STRING'] == "codes") { ?>
//Paste here your HTML code on the Codes page (without the header and footer code, obviously).

<? } elseif ($_SERVER['QUERY_STRING'] == "members") { ?>
//Paste here your HTML code on the Members page (without the header and footer code, obviously).

<? } elseif ($_SERVER['QUERY_STRING'] == "extra") { ?>
//Paste here your HTML code on the Extra page (without the header and footer code, obviously).

<? }
include('footer.inc'); ?>

ist auch kein Problem, wenn als festen Bereich, der geändert werden soll nur oben ein bisschen habe. Jetzt soll aber der Inhalt (der an den elseif-punkten eingefügt wird) in der Mitte der Seite erscheinen mit "Design" drumherum. Kann man das irgendwo festlegen?

Vielen Dank ..

Anja