Reply to Re: [PHP] Writing static file from dynamic PHP page

Your name:

Reply:


Posted by Hugh Danaher on 01/19/05 06:35

Chris,
I've done something like this to update website's static pages. Basically,
in a php script I've replaced all of the "print" statements with "$line.= "
statements to accumulate all the items you want printed into one long
string. I've then ftp'ed this string, along with the name of the html page,
to the website where the page is to be viewed.
You could also set up an html page with links to a php page that generates
the above stuff, and then use a header() command as the last line of the php
page to go to the .html page you just generated.
Hope this helps.
Hugh

----- Original Message -----
From: "Chris Bruce" <chris@idextrus.com>
To: "PHP-General" <php-general@lists.php.net>
Sent: Monday, January 17, 2005 7:16 PM
Subject: [PHP] Writing static file from dynamic PHP page


> Hi,
>
> I am looking for a way to write to a file what the browser would see (raw
> html) when viewing a dynamic PHP page. I have numerous include files,
> MySQL db queries, loops etc. and I want to generate the static result of
> that file and save it as an html page. I have toyed a little with output
> buffering to no avail.
>
> Is there an easy way to do this?
>
> Thanks,
>
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005
>
>



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация