
Ihr Browser versucht gerade eine Seite aus dem sogenannten Internet auszudrucken. Das Internet ist ein weltweites Netzwerk von Computern, das den Menschen ganz neue Möglichkeiten der Kommunikation bietet.
Da Politiker im Regelfall von neuen Dingen nichts verstehen, halten wir es für notwendig, sie davor zu schützen. Dies ist im beidseitigen Interesse, da unnötige Angstzustände bei Ihnen verhindert werden, ebenso wie es uns vor profilierungs- und machtsüchtigen Politikern schützt.
Sollten Sie der Meinung sein, dass Sie diese Internetseite dennoch sehen sollten, so können Sie jederzeit durch normalen Gebrauch eines Internetbrowsers darauf zugreifen. Dazu sind aber minimale Computerkenntnisse erforderlich. Sollten Sie diese nicht haben, vergessen Sie einfach dieses Internet und lassen uns in Ruhe.
Die Umgehung dieser Ausdrucksperre ist nach §95a UrhG verboten.
Mehr Informationen unter www.politiker-stopp.de.
| Menu verstecken/anzeigen |
|
Menü |
[JB] PHPHP - How does it work? / Basic Configuration ![]() |
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The main configuration fileinc.php defines how your site should look different from the "default" PHPHP layout. You should NEVER use inc_page.php directly (in case there are updates or changes in PHPHP that you want to use), but always subclass the "page" class defined in inc_page.php. How does that work?Simple. Just create a minimal inc.php file in the directory where all the PHPHP files are (by default, this should be at least inc_page.php, _kopf.html, and _fuss.html). Put the following text into that file:
<?php
include "inc_page.php";
class mypage extends page {
}
?>
Now create an index.php with this content:
<?php
include "inc.php";
$p = new mypage;
print $p->kopf();
?>
....
<?php
print $p->fuss();
?>
Bingo. Upload these pages to your web server (where the PHPHP files reside) and call this page in your web browser (note: over the web server, ie. via http://your-domain/). You should see this page structure, but with no content. You then put your actual content where the "...." is. For experts: These lines are the 'standard' header for every page. You can, if you want to, write them to a seperate header/footer file and tell PHP via .htaccess and auto_prepend_file and auto_append_file to automatically include them in every file. Saves another bit of writing for each page. :-) Customizing your pageNow, you don't want your page to contain exactly the same text as mine. Or do you? ;-) There's an array of variables to be replaced in _kopf.html and _fuss.html. Those variables get defined in a $vars array. Change the inc.php to something like
<?php
include "inc_page.php";
class mypage extends page {
var $vars = array (
DOCUMENT_ROOT => "/home/users/myaccount/htdocs/subdir",
DOCUMENT_REL => "/subdir",
BASISTITEL => "My Home Page: ",
MAIN_TITEL => "Welcome!",
HOME => "/",
MENU_TITEL => "Choose an item",
TITEL_IMG => "title_image.png",
TITEL_ALT => "ALT-Text für Titelbild",
LOGO_IMG => "logo.jpg",
LOGO_ALT => "ALT-Text für Logo",
MOTD => '"Advanced Java Servlet Portal Platform Software
Agent Corporate Management System"',
BOTTOM_TEXT => "Copyright (c) 2003 XYZ.",
);
}
?>
Now, the first two are important. They define where PHPHP searches for its other files. DOCUMENT_ROOT defines the absolute root directory of your web site (on the server). DOCUMENT_REL defines the relative (to the web root) place. The others just replace placeholders in _kopf.html and _fuss.html. If you look into those files, you will see that BASISTITEL defines what is put in front of every page title, MAIN_TITEL defines the title of the main page of your web site. HOME defines the location where the "title" image should link. MENU_TITEL defines the title of the left hand side menu, and so on. Just try it out. :)
Zuletzt geändert am: 16.06.2003 01:16
| ||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|