Reply to Re: storing included file output in buffer?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация