Re: Writing static file from dynamic PHP page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
To: "PHP-General" <php-general@xxxxxxxxxxxxx>
Sent: Monday, January 17, 2005 7:16 PM
Subject: 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux