Maybe something like that ?
<?
$page = "..."; // the content which will replace {content}
$filename = "template.dat"; // the template filename
$fp = fopen($filename, "r"); // open $filename
$contents = fread($fp, filesize($filename)); // read the contents of $filename
fclose($fp); // close $filename
$contents = str_replace("{content}", $page, $contents); // replace {content} by $page
echo $contents; // echoes $contents
?>