Re: [Fwd: Re: [PHP] Re: How to take output from an include, and embed it into a variable?]

2009-09-25 Thread Robert Cummings
Carl Furst wrote: You mean like this ? $file string = file_get_contents(urlencode($file_path)); $result = eval($file_string); ?> Well I see a few problems with this. One is that scope is not lexical. In other words if $foo exist

[Fwd: Re: [PHP] Re: How to take output from an include, and embed it into a variable?]

2009-09-25 Thread Carl Furst
<mailto:hp...@xentra.ro>] Sent: Wednesday, September 23, 2009 1:36 PM To: php-general@lists.php.net <mailto:php-general@lists.php.net> Subject: [PHP] Re: How to take output from an

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-25 Thread Phpster
eneral@lists.php.net Subject: [PHP] Re: How to take output from an include, and embed it into a variable? Hi, The simplest way (actually the single way I know :) ) would be to capture the output using output buffering functions, something like this: // start output buffering ob_start(); /

Re: Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-25 Thread Geert Tapperwijn
ing is the actual source of the document. Not the data the script >>>> would >>>> output when ran. >>>> >>>> The ob_* functions are the only way that I know of to do what you are >>>> asking >>>> >>>> >&

Re: Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-24 Thread Carl Furst
pt would output when ran. The ob_* functions are the only way that I know of to do what you are asking -Original Message- From: Puiu Hrenciuc [mailto:hp...@xentra.ro] Sent: Wednesday, September 23, 2009 1:36 PM To: php-general@lists.php.net Subject: [PHP] Re: How to take output from

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Jim Lucas
--Original Message- >>> From: Puiu Hrenciuc [mailto:hp...@xentra.ro] >>> Sent: Wednesday, September 23, 2009 1:36 PM >>> To: php-general@lists.php.net >>> Subject: [PHP] Re: How to take output from an include, and embed it into a >>> variable?

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Ben Dunlap
> $file = 'invoicetable_bottom.php'; > fopen("http://yoursite.com/folder/$file","r";); > > http://tr.php.net/function.fopen > > worth trying. Easier than output buffering Easier in what sense? It would end up requiring more code than output-buffering because you'd have to read from the file after

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Ashley Sheridan
uld be > reading is the actual source of the document. Not the data the script would > output when ran. > > The ob_* functions are the only way that I know of to do what you are asking > > > -Original Message- > > From: Puiu Hrenciuc [mailto:hp...@xentra.ro]

Re: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Jim Lucas
way that I know of to do what you are asking > -Original Message- > From: Puiu Hrenciuc [mailto:hp...@xentra.ro] > Sent: Wednesday, September 23, 2009 1:36 PM > To: php-general@lists.php.net > Subject: [PHP] Re: How to take output from an include, and embed it into a > va

RE: [PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Mert Oztekin
utput buffering -Original Message- From: Puiu Hrenciuc [mailto:hp...@xentra.ro] Sent: Wednesday, September 23, 2009 1:36 PM To: php-general@lists.php.net Subject: [PHP] Re: How to take output from an include, and embed it into a variable? Hi, The simplest way (actually the single way I kno

[PHP] Re: How to take output from an include, and embed it into a variable?

2009-09-23 Thread Puiu Hrenciuc
Hi, The simplest way (actually the single way I know :) ) would be to capture the output using output buffering functions, something like this: // start output buffering ob_start(); // include the file that generates the HTML (or whatever content) include ""; // get output buffer content $