Hallo PHP
Jedes Programmierhandbuch beginnt mit dem Programm "Hallo".
Sinn und Zweck dieses Programms ist ein erstes schnelles Erfolgserlebnis für den zukünftigen Programmierer.
PHP ist wie C nur das die Variablen wie BASIC-Stringvariablen sind.
<?php
echo ( 'Hallo' );
?>
Das ist also der PHP Code um "Hallo" ins Browserfenster zu schreiben.
Am Anfang die der TAG um PHP zu starten bzw dem Apache zu sagen das nun PHPcode kommt.
Am Ende kommt dan noch der TAG um PHP zu beenden.
<?php ?>
Da es keine PHP-Webseiten gibt, fehlt hier noch das HTML.
HTML-Version
<html>
<body>
Hallo
</body>
</html>
PHP-Version
<html>
<body>
<?php echo ( 'Hallo' ); ?>
</body>
</html>
Ich selbst bzw mein CMS arbeiten da nochmal etwas anders
HTML-Template
<html>
<body>
_content_
</body>
</html>
PHP-Script
<?php
$tbuf = file_get_contents( 'template.html' );
$content = 'Hallo ';
$content .= 'Duda ';
$tbuf=str_replace('_content_',$content,$tbuf);
echo($tbuf);
?>
