ITK中国设计秀
$reg_check=0;
ITK中国设计秀
}
ITK中国设计秀
}
ITK中国设计秀
ITK中国设计秀
十五、 不使用 file();和不使用 fget();(不稳定或速度慢) 取一数组函数
ITK中国设计秀
ITK中国设计秀
function openfile($filename,$method="rb")
ITK中国设计秀
{
ITK中国设计秀
$handle=@fopen($filename,$method);
ITK中国设计秀
@flock($handle,LOCK_SH);
ITK中国设计秀
@$filedata=fread($handle,filesize($filename));
ITK中国设计秀
@fclose($handle);
ITK中国设计秀
$filedata=str_replace("n","n",$filedata);
ITK中国设计秀
$filedb=explode("",$filedata);
ITK中国设计秀
//array_pop($filedb);
ITK中国设计秀
$count=count($filedb);
ITK中国设计秀
if($filedb[$count-1]==''){unset($filedb[$count-1]);}
ITK中国设计秀
return $filedb;
ITK中国设计秀
}
ITK中国设计秀
ITK中国设计秀
这个函数虽然代码比较多,不过在速度和稳定性上优势很大!
ITK中国设计秀
ITK中国设计秀