Posted by Colin McKinnon on 07/25/05 16:47
Schraalhans Keukenmeester wrote:
<snip>
>
> 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";
> }
> [...]
> }
>
You could use output buffering, but a simpler solution would be:
$this->content .= file($filename);
(assuming that filename is a URL, and there is no restriction on the file
wrappers).
You might have to mung the output to get embeddable html.
HTH
C.
[Back to original message]
|