Re: Redirecting HTML output to FILE
| From: | Paul Padilla | Date: | Fri, 29 Mar 2002 18:27:27 +0000 |
| Subject: | Re: Redirecting HTML output to FILE | ||
| References: | 1 2 | Groups: | php.lang |
| Request: | Send a blank email to php-lang+get-279@lists.php.net to get a copy of this message | ||
Hi Kresimir,
Thanks for the reply but I have a PHP URL with a GET method that
returns a page based on the parameters passed. How do I capture the
resulting page to a variable or to a file?
Cheers,
Paul
In article <20020329155717.92558.qmail@pb1.pair.com>, Kresimir Kondza
wrote:
> in this case you use file functions.
>
> first you open a file with
> $fp=fopen("local file adress","w"); // opens a file for writing
>
> then you put some text into a var
>
> $file_content="This is content of the file you are cretaing";
>
> and then you print this to file
> fputs($fp,$file_content);
>
> and you close the file
> fclose($fp);
>
> that's it