ive been trying out the FastTemplate example from professional PHP programming book p 549. all works fine except that when the template vars {CONTENT} are expanded the {} characters are included in the html output ! Even worse all occurances of the text CONTENT in the template are expanded. Im using PHP Version 4.0.1pl2 and class.FastTemplate.php3 Version: 1.1.0
has anyone seen this before ?
I ran into a similar problem. Edit the class.FastTemplate.php3 file.
In the function parse_template change the line from:
$template = str_replace("{$key}","$val","$template");
to:
$template = ereg_replace("\{$key\}","$val","$template");
Looks like the Dynamic stuff maybe broken also.
In the function parse_dynamic
change the line:
$newParent .= "{$MacroName}\n";
$newParent .= "\{$MacroName}\n";
this seems to fix things but needs more testing.
There's a diff on the FastTemplate site that fixes these issues.
how do you install the DIFF under windows?