Hi,
I'm have a dynamic site and I have to put it on CD. So this means I need every page to be in html. I found the following code that could help me:
ob_start(); // before outputting anything
// here HTML output created by normal PHP code
$contents=ob_get_contents(); //when it's finished
ob_end_clean(); // stop output buffering
//then write to file
$fd=@fopen('thefile.html','w'); // this REWRITES (creates) the file
if ($fd) {
fputs($fd,$contents);
fclose($fd);
} // else NOP
// then send to user's browser :
echo $contents;
but it doesn't work. I know what it should do, but nothing happens. I just get a blank page, and I'm not sure where my "thefile.html" page went! Can anybody help me?