RE: [PHP-WIN] Seeking a function, class or other means to save the current PHP page as an HTML file on the server.

2008-03-06 Thread TG
If by 'breaks' you mean that it's not saving as a .HTML file, you should be able to set the filename in the header when you force the download. If that's not it, if you care to elaborate, maybe we can give a better suggestion. -TG - Original Message - From: "Greg Cocks" <[EMAIL PROTEC

RE: [PHP-WIN] Seeking a function, class or other means to save the current PHP page as an HTML file on the server.

2008-03-06 Thread Greg Cocks
Thanks so much to all for the replies... Michael's method works work for a static page... but as the (*.php) page gets data from a PostgreSQL database to display it "breaks", not unreasonably, when it is saved using this method as a *.html. Fun to learn new stuff... I am off to try and lear

Re: [PHP-WIN] Seeking a function, class or other means to save the current PHP page as an HTML file on the server.

2008-03-06 Thread TG
Yeah, the trick is you want to force the download. If you send HTML or text without setting the disposition properly, it'll just display in the browser. Maybe something like this will help: http://www.boutell.com/newfaq/creating/forcedownload.html Good luck! -TG - Original Message ---

Re: [PHP-WIN] Seeking a function, class or other means to save the current PHP page as an HTML file on the server.

2008-03-06 Thread Michael Southworth
As a quick answer, I think the easiest way is to have a link reload the page, with a flag to set the content disposition header. See: http://us3.php.net/header Example #1 It should be fairly straightforward from there. If I do recall, there may be some quirks with IE, a quick google should bring up

[PHP-WIN] Seeking a function, class or other means to save the current PHP page as an HTML file on the server.

2008-03-06 Thread Greg Cocks
Hello, I am seeking a function, class or other means to save the current PHP page as an HTML file on the server. The user, via a button, could then 'download' this page much like if they had gone to their "File... Save Page As.." menu to save it locally. This is for a (dynamic) page tha