时间:2021-07-01 10:21:17 帮助过:6人阅读
predicate = $predicate;
$this->path = $path;
$it = new RecursiveDirectoryIterator($path);
$flatIterator = new RecursiveIteratorIterator($it);
parent::__construct($flatIterator);
}
public function accept()
{
$pathInfo = pathinfo($this->current());
$extension = $pathInfo['extension'];
return ($extension == $this->predicate);
}
}
?>
";
}
?>
版权声明:本文为博主原创文章,未经博主允许不得转载。
以上就介绍了php使用spl库遍历文件,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。