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
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 exists somewhere in the

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

2009-09-25 Thread Phpster
On Sep 25, 2009, at 3:12 PM, Geert Tapperwijn wrote: Can't you just use the eval function, and parse the code from the include file in it? .. or is there something I'm missing her Because eval has risks if code gets injected into the code you mean to run.

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

2009-09-25 Thread Geert Tapperwijn
Can't you just use the eval function, and parse the code from the include file in it? .. or is there something I'm missing here? 2009/9/25 Carl Furst > > > Jim Lucas wrote: > >> Ashley Sheridan wrote: >> >> >>> On Wed, 2009-09-23 at 07:36 -0700, Jim Lucas wrote: >>> >>

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

2009-09-24 Thread Carl Furst
Jim Lucas wrote: Ashley Sheridan wrote: On Wed, 2009-09-23 at 07:36 -0700, Jim Lucas wrote: Mert Oztekin wrote: Output buffering will do it. Also I am not sure but did you try retrieving content with fopen() ? Something like $file = 'invoicetable_bottom.php'; fopen("http://

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

2009-09-23 Thread Jim Lucas
Ashley Sheridan wrote: > On Wed, 2009-09-23 at 07:36 -0700, Jim Lucas wrote: >> Mert Oztekin wrote: >>> Output buffering will do it. >>> >>> Also I am not sure but did you try retrieving content with fopen() ? >>> >>> Something like >>> >>> $file = 'invoicetable_bottom.php'; >>> fopen("http://yours

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
On Wed, 2009-09-23 at 07:36 -0700, Jim Lucas wrote: > Mert Oztekin wrote: > > Output buffering will do it. > > > > Also I am not sure but did you try retrieving content with fopen() ? > > > > Something like > > > > $file = 'invoicetable_bottom.php'; > > fopen("http://yoursite.com/folder/$file","

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

2009-09-23 Thread Jim Lucas
Mert Oztekin wrote: > Output buffering will do it. > > Also I am not sure but did you try retrieving content with fopen() ? > > Something like > > $file = 'invoicetable_bottom.php'; > fopen("http://yoursite.com/folder/$file","r";); > > http://tr.php.net/function.fopen > > worth trying. Easier

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

2009-09-23 Thread Mert Oztekin
Output buffering will do it. Also I am not sure but did you try retrieving content with fopen() ? Something like $file = 'invoicetable_bottom.php'; fopen("http://yoursite.com/folder/$file","r";); http://tr.php.net/function.fopen worth trying. Easier than output buffering -Original Message