Re: writing source code to file
| From: | Hannes Magnusson | Date: | Tue, 17 Aug 2004 23:08:27 +0000 |
| Subject: | Re: writing source code to file | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194104@lists.php.net to get a copy of this message | ||
On Wed, 18 Aug 2004 00:50:45 -0700
webmaster@acecoolco.com (Josh Acecool M) wrote:
>
> file_get_contents("http://www.yoursite.com/script.php");
I belive that this method will hang for ever since the script doesnt exit until file_get_contents()
has got the complete results.. ...and the complete results wont be ready until file_get_contents()
returns.
Rather use Output Controle via PHP ( php.net/outcontrol )
- Hannes
>
> using http:// causes it to get the html source.
> "Hannes Magnusson" <bjori@jeshus.com> wrote in message
> news:20040816191756.078fe760.bjori@jeshus.com...
> > http://www.php.net/manual/en/ref.outcontrol.php
> >
> > On Mon, 16 Aug 2004 10:35:42 -0400
> > dparker@music123.com (Doug Parker) wrote:
> >
> > > I was wondering if there was a block of code I could place at the bottom
> of
> > > the file that would write the page's source code to an html file. I
> need
> > > this because I'm posting pages to a server sans a PHP compiler.
> Basically,
> > > I'd like for every time I run a page its source code to be saved in the
> > > filename of my choice, instead of me having to run the page, copy the
> > > source, and paste it into the file of my choice. I know how to use
> fopen,
> > > but I'm not sure what to tell it to write to file, since the source I
> want
> > > to write is being generated simultaneously.
> > >
> > > Any help would be greatly appreciated...