<?php
include("yz.php"); 

////////////////////////////////////

$nr = $_GET['nr'];
 ob_start();   //打开缓存区
 require('../action/'.$nr.'.php');  //arc.php为生成静态文件内容的页面
 $a= ob_get_contents(); //获取缓冲区的内容
 ob_end_clean();
 MakeHtmlFile("../".$nr.".php",$a);
function MakeHtmlFile($file_name, $content){
 if (!file_exists (dirname($file_name))){
  if (!@mkdir (dirname($file_name), 0777)) {
   die($file_name."创建失败！"); 
  }
 } 
 if(!$fp = fopen($file_name, "w")){ 
  echo "文件打开失败！";
  return false;
 } 
 if(!fwrite($fp, $content)){ 
  echo "文件写入失败！";
  fclose($fp);
  return false;
 } 
 fclose($fp);
 @chmod($file_name,0666);
 return true;
}

///////echo "<script>alert('".$nr."成功生成,请关闭本页面');<//script>";/////////////////////////////////

?>



<script language=javascript>  
<!--  
this.window.opener = null;  
window.close();  
//-->  
</script>




