作者:9158Zsc | 来源:互联网 | 2023-02-05 18:52
php教程|php手册PHP,实现,查找,指定,目,录下,指,定文件,php,class,document,private,file,arphp教程-php手册
php教程|php手册
PHP,实现,查找,指定,目,录下,指,定文件,php,class,document,private,file,ar
php教程-php手册
class document{
private $file_array=array();
private $folder_array=array();
private $all_array=array();
function search($path,$file){
if(is_dir($path)){
$H=opendir($path);
while(false!==($_file=readdir($H))){
if(is_dir($path.”/”.$_file)&&$_file!=”.” && $_file!=”..” && $_file!==”Thumbs.db”){
if(eregi($file,$path.”/”.$_file)){
array_push($this->folder_array,$path.”/”.$_file);
}
$this->search($path.”/”.$_file,$file);
}elseif(is_file($path.”/”.$_file)&&$_file!=”.” && $_file!=”..” && $_file!==”Thumbs.db”){
if(eregi($file,$_file)){
array_push($this->file_array,$path.”/”.$_file);
}
}
}
$this->all_array[“folder”]=$this->folder_array;
$this->all_array[“file”]=$this->file_array;
return $this->all_array;
closedir($H);
}elseif(is_file($path)){
if(eregi($file,$path)){
$this->all_array[“file”]=$path;
}
return $this->all_array;
}else{
return $this->error(“this folder does not exits,please check it out.”);
}
}
}
?>
安卓表白软件源码,ubuntu配置ssh访问,大连哪卖爬虫,php方式,seo专业薪金lzw