|
Posted by Schraalhans Keukenmeester on 07/25/05 16:36
I have a class webpage that allows me to build a page before outputting it.
It has member functions header(), footer(), body('literal html string'),
bodyhtmlfile ('filename to html file')
I would like to be able to include (the output) of php files as well.
Is it possible to have a separate php file produce some output (e.g.
some table filled with mysql db entries) which I can store in a webpage
instance ?
I tried this:
class webpage
{
[...]
function bodyphpfile ($filename)
{
$this->content .= include "$filename";
}
[...]
}
but as I expected include doesn't do it, as it only returns a bool.
If I treat the php file like a html file (parsed line by line) it simply
adds the php lines to the output, but of course it isn't parsed by the
PHP interpreter.
Help appreciated.
KR
Schraalhans
Navigation:
[Reply to this message]
|