August 20th, 2000, 08:16 PM
I was wondering if i can get help on how to go about writing a file using a template. The template does several calls to the database and all parses out nicely.. but i want to save that as a static html page.
I've tried to use the fputs but it needs a string... and I'm stumped here. Has anyone tried doing this and has an example I could follow?
August 20th, 2000, 09:06 PM
You could cheat Get the output as you would want it, and have it called with
lynx -source http://localhost/page.php > static.html
Low cost high uptime
for your sites.
August 21st, 2000, 06:36 AM
Sorry I'm not familiar with lynx. Could you explain this?
If so.. can i use one of the php functions to call upon this command? eg. exec() ??
I've tried many ways, eg popen and readfile.. none seem to work for me.. i'm not sure why it's not working.
anybody know of a way?
September 13th, 2000, 08:05 AM
maybe you can try to solve it like that:
$id = 123;
$fpi = fopen($url, "r");
$fpo = fopen("rec".$id.".htm", "w");
while ($line = fgets($fpi, 200))
fputs($fpo, $line, 200);
hope this will help you...