function html_web( $cachename,$bts,$p) {$p_1=$p;
if(!file_exists($cachename)){
//判断HTML是否存在
echo "yes";
}else{
if($open=file($cachename)){ $count=count($open);
for($i=0;$i<$count;$i++){
$theget.=$open[$i]; }
$mystr=$theget;
}else{
$mystr="";;
}
$mystr=gzuncompress($mystr);
$mystr= preg_replace('/http:\/\/*\/43\/html\/img.php\?web=(.+?)&do=/is',"http://*/img/",$mystr);
$mystr=str_replace("&fm=20",".jpg",$mystr);
$pieces = explode("<!--FenGe-->", $mystr);$btdata=$pieces[0];
$p_2=$pieces[1];
$keywords=$pieces[2];
$description=$pieces[3];
$time=$pieces[4];
$newlist=$pieces[5];
$newslist=$pieces[6];
$newlink=$pieces[7];
//$da1=$pieces[8];
$StarGet_2=$pieces[8];
$List=$pieces[9];
//开始定义上下页 $btdata_1=$btdata;
$btdata= preg_replace('/ site:(.+?)(.com.cn|.com|.cn|.net|.org|.tv)/i',"",$btdata);$btdata_2=UrlEncode($btdata_1);
$btdata_1=str_replace("%","li",$btdata_2);
if($p !=""and$p !="0"and $p<2000 and is_numeric($p)){
$p=$p-20;
if($p!="0"){
$link_web = '&nbsp;<a href="/play/'.$btdata_1.'-'.$p.'.html">上一页</a>';
}else{
$link_web = '&nbsp;<a href="/play/'.$btdata_1.'.html">上一页</a>';
}
}
else{}$p=$p_1;
if($p !=""and $p<2000 and $btdata_1 !="liCAliD3liC6liB5liD7liA8liCCliE2liD2liB3liC3liE6" and $description =="20"){
$p=$p+20;
$link_web_1 = '&nbsp;<a href="/play/'.$btdata_1.'-'.$p.'.html">下一页</a>';
}
else{
if($btdata_1 !="liCAliD3liC6liB5liD7liA8liCCliE2liD2liB3liC3liE6" and $description =="20"){
$p=+20;
$link_web_1 = '&nbsp;<a href="/play/'.$btdata_1.'-'.$p.'.html">下一页</a>';
}
}
//结束定义上下页
$html_web_data = file_get_contents("43/html/html_web.html");
$html_web_data=str_replace("{btdata}",$btdata,$html_web_data);
$html_web_data=str_replace("{p_2}",$p_2,$html_web_data);
$html_web_data=str_replace("{time}",$time,$html_web_data);
$html_web_data=str_replace("{newlist}",$newlist,$html_web_data);
$html_web_data=str_replace("{newslist}",$newslist,$html_web_data);
$html_web_data=str_replace("{newlink}",$newlink,$html_web_data);
$html_web_data=str_replace("{StarGet_2}",$StarGet_2,$html_web_data);
$html_web_data=str_replace("{link_web}",$link_web,$html_web_data);
$html_web_data=str_replace("{link_web_1}",$link_web_1,$html_web_data);
$html_web_data=str_replace("{List}",$List,$html_web_data);
$fp2 = @fopen("play/".$bts.".html","w");
@flock($fp2,2);
@fwrite($fp2,$html_web_data);
@fclose($fp2);
echo $html_web_data;
exit;

}//return true;
}
服务器上建立play这个文件夹让其正常生成静态页面 CPU就会被占特别多 删除掉play这个问题就没了?到底是哪出了问题