<?php  
ob_start();   //开启服务器缓存  
include_once 'index.php';   
$ctx=ob_get_contents();     //获取缓存  
ob_end_clean();     //清空缓存   
$fh=fopen("../index.html","w");    
fwrite($fh,$ctx);    //写入html,生成html  
fclose($fh);    
echo "<font color='red'>首页文件生成成功</font>";  
?>  