View Single Post
Old 01-18-2008, 05:18 PM   #2 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Capture the output of the file into the buffer, then just echo it. Like so:

PHP Code:
ob_start();
require 
$template_file;
$template_contents_parsed ob_get_contents();
ob_end_clean();

echo/return 
$template_contents_parsed
This is the path I've chosen (over Smarty-like "template engines" and php function based templates). It's very fast, very useful, and extremely flexible. You can go with what ever suits you, just think of your needs first.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
The Following 2 Users Say Thank You to xenon For This Useful Post:
Orc (01-18-2008), RobertK (01-18-2008)