Hi there,
I'm using the following code to evalute a *.tpl file.
$tempfile = "../../templates/site_document.tpl";
$template = fopen ($tempfile, "r");
$content = fread ($template, filesize ($tempfile));
$title = "This is my title";
$copy = "This is my copy";
eval ("\$content = \"$content\";");
echo $content;
Here is the template file:
<div align="center">$title</div>
<span class="copyClass">$copy</span>
My question....
How can I change the format of $title and $copy so that it evalustes {title} and {copy} instead.
Many scripts such as phpBB use this format. 🙂
Any help VERY much appreciated.
I think the eval statement need modification. HOw I dont know?!?! 🙂