chef:
$filedata = fread($fp,filesize($filename));
$replacement = str_replace("{TEXT}","blabla",$filedata);
$filedata = fread($fp,filesize($filename));
$replacement = str_replace("{TEXT}","blabla",$filedata);
<?php
function ParseHyper($tpl) {
global $title;
$tpl = str_replace("{TITLE}","$title",$tpl);
return stripslashes($tpl);
}
$title="Titel der Seite by hand";
$file = "main.html";
@$fp = fopen($file,"r");
while (!feof($fp)) {
$tpl .= fgets($fp, 4096);
}
@fclose($fp);
print ParseHyper($tpl);
?>
Kommentar