[thelist] Re: PHP Templating recommendations

Bird, Graham Graham.Bird at rspb.org.uk
Thu Feb 3 03:50:15 CST 2005


You could use ob_start etc combined with eval to create "real PHP" templates
containing executed code.

I did something similar for a small CMS - its not the most efficient way of
doing things but for small scale projects it might be OK. You can improve
things by writing the output to the file system and using it as a
semi-static system.

eval('?>' . $template_code;
$output = ob_get_contents();

Hope it helps.



More information about the thelist mailing list