Cheers TG, The query page is a form that gather the user selections, queries a PostgreSQL database using them, and returns some analytical data as an array which I serialise into a text file. The results page, the one I want to let the user save as an HTML 'file' is a PHP page that unserialises the data out of the array from the text file, and displays it in some formatted tables, one sub-table per data row (1 row to many hundreds) - as well as some SESSION variables, etc of the SQL string used to get the data (as a user reference) and the logged on user name & date, a list of some reference data (what the qualifers, etc mean) pulled directly out of the database, etc, etc. Using the File... Save Page As... method in the browser works well enough to save the HTML as a file/directory pair (although if you open separately, it looses track of the CSS file of course...) The 'breakage' is that because the results page file needs to be a PHP to unserialise the array, get the reference data from the database, etc, etc if you save it as an HTML page using the header / disposition method it displays all the pure HTML just fine of course - but gags on the PHP, thinking it is HTML... I know I have explained this simplistic and have a lot to learn about all this... the newbie toe-dipping phenomena! :-) Regards, GREG COCKS Gcocks | at | stoller.com -----Original Message----- From: TG [mailto:tg-php@xxxxxxxxxxxxxxxxxxxxxx] Sent: Thursday, March 06, 2008 9:59 PM To: Greg Cocks; php-windows@xxxxxxxxxxxxx Subject: RE: Seeking a function, class or other means to save the current PHP page as an HTML file on the server. 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" <gcocks@xxxxxxxxxxx> To: <php-windows@xxxxxxxxxxxxx> Date: Thu, 6 Mar 2008 20:40:36 -0700 Subject: RE: Seeking a function, class or other means to save the current PHP page as an HTML file on the server. > 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 learn how I can make this > work, with the leads provided... :-) > > > In the *meantime*, under the "Save As HTML" icon I have put some text > letting the user know about File... Save Page As... (or ... Save As...) > > > I am going to look at maybe using this method with a PDF generation > method to 'make' the page as a PDF for them to download... > > > Thanks again... what a resource... > > Regards, > > GREG COCKS > > gcocks | at | stoller.com <mailto:gcocks@xxxxxxxxxxx> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php