I have been trying to use php's inlude to include a template file which has been marked up with some php variables. However when using include() the php parsing drops out. This code keeps the parsing on. Hope its of use to someone.
$buffer = addslashes(get_include_contents('resultspage.htm'));
eval("echo \"".$buffer."\";");
function get_include_contents($filename) {
if (is_file($filename)) {
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
return $contents;
}
return false;
}
results page.htm:
....
<TD>{$output[num_responses]}</TD>
....