Ok here's my situation.
I've got an index.php file that based on various actions, uses a function that loads various files for a small section of the page. These various files are currently a mix of html and php.
part of the function is:
...
$fullpath="$directory"."$load"."/$section";
if(is_readable($fullpath))
{
include($fullpath);
}
else
...
so you can see that when this function is called in index.php, given certain things, it will call the file as an include. So far, this has worked quite well and it displays the minipage complete with html and php.
However, it has progressed that I need to fire up these files before anything is sent to the user, so I can redirect or kill the entire thing if necessary. So basically, I want to be able to store the complete output of said file in a variable like $contents and then in index.php just do
echo "$contents";
wherever I want it to print. Obviously if I just do a simple include up top, it will print out the html. I was thinking about trying to do it with eval, but that seems to produce a parce error because as I stated before, its a mix of html and php (little mini pages).
Any thoughts?