die('请求过多,超时,请刷新'); } return $theget;
}
function update($file,$type=''){ //更新cache中的文件 global $timestamp,$flush; if(!file_exists("cache/$file")){ if($type){ $data=open($file,$type); }else{ $data=open($file); } writetofile("cache/$file",$data); }else{ $lastflesh=@filemtime("cache/$file"); if($lastflesh + ($flush * 60) < $timestamp ){ if($type){ $data=open($file,$type); }else{ $data=open($file); } writetofile("cache/$file",$data); } }
} function readfromfile($file_name) { if($filenum=fopen($file_name,"r")){ flock($filenum,LOCK_SH);
上一篇:跟我学小偷程序教程之小偷原理(第一天)
下一篇:各种媒体在线播放代码
|