function makehtml($file_str,$file_name,$file_path){
$file_url=$file_path."/".$file_name.".html";
$fp=fopen($file_url,"w+");
fputs($fp,"$file_str");
fclose($fp);
return(file_exists($file_url));
}

解决方案 »

  1.   

    这是我自己瞎写的一个函数!$file_str,写入文件的字符串
    $file_name,文件名
    $file_path文件存放路径
    这个只是生成html文件的!
      

  2.   

    <?php 
    ob_start();//打开缓冲区 
    ?> 
    php页面的全部输出 
    <? 
    $content = ob_get_contents();//取得php页面输出的全部内容 
    $fp = fopen(“output00001.html”, “w”); //创建一个文件,并打开,准备写入 
    fwrite($fp, $content); //把php页面的内容全部写入output00001.html,然后…… 
    fclose($fp); 
    ?>
      

  3.   

    http://www.phpe.net/articles/123.shtml控制浏览器的cache来实现
      

  4.   

    <?php
    $filename = "http://www.sohu.com";
    $html=file_get_contents($filename);
    echo $html;
    ?>