Re: saving to a file.
| From: | Michael | Date: | Fri, 08 Sep 2000 22:09:23 +0000 |
| Subject: | Re: saving to a file. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15959@lists.php.net to get a copy of this message | ||
I'm not sure if this is the best way to do it but the solution I went with
is as follows:
} else if ($file=fopen("top_150.html", "w")) {
fputs($file," <html>
");
that seemed to do the trick..
Thanks for the comments,
Michael
----- Original Message -----
From: "Tim McGuire" <tim.mcguire@dnr.state.mn.us>
To: <php-general@lists.php.net>; <rhuian@noxordo.com>
Sent: Friday, September 08, 2000 3:21 PM
Subject: Re: [PHP] saving to a file.
> here is one example of writing to a file:
>
>
>
> <?
> $thefile = fopen("AreaList.html","w");
>
> $filestring = "<HTML><HEAD><TITLE>AREA
> LIST</TITLE></HEAD>";
> $filestring .= "<BODY> <h3>THIS IS THE AREA LIST</h3> ";
> $filestring .= "<TABLE>BLAH BLAH ALL YOUR OUTPUT GOES
HERE</TABLE></body>";
> $filestring .= "</HTML>";
>
>
> fwrite($thefile,$filestring);
>
>
> ?>
>
>
> >>> "Michael" <rhuian@noxordo.com> 09/08/00 02:29PM >>>
> I've got php code that displays in a web page just fine. How do I go about
> saving what is displayed to a file, as well as or rahter than printing it
to
> the screen?
>
> thanks.
>
> Michael
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>