php使用spl库遍历文件

实例代码:

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编程)