From: "Brent Baisley" <[EMAIL PROTECTED]>

> I looked into the templating systems at first, but really wanted to try
> what they were doing myself. It ends up being very easy to implement
> using output buffering. Just look into the ob_start() command. Here is
> an example of how I load a template file into a variable:
> ob_start();
> include("templateFile.tpl");
> $tpl_content = ob_get_contents();
> ob_end_clean();

The only "problem" with a method like that is any PHP code in your template
file is evaluated. If you're the only one writing template files, you can be
careful, but any malicious PHP code that worked it's way into the template
could cause trouble.

You could just use file_get_contents().

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to