Forum Moderators: coopster

Message Too Old, No Replies

Generate HTML

generate static page using html

         

chris2giny2

7:27 am on Feb 4, 2004 (gmt 0)

10+ Year Member



I'm currently parsing users requests to generate a php page. In addition to returning the page to the user how can I save this response as a static html page on my server? Many thanks.

mykel79

10:23 am on Feb 4, 2004 (gmt 0)

10+ Year Member



Use the filesystem functions of php.
Something like this:
$f1=fopen("name-of-file-with-full-path.html","w");
fputs($f1,$content_of_html_file);
fclose($f1);

chris2giny2

10:54 am on Feb 4, 2004 (gmt 0)

10+ Year Member



Thanks Mykel.