php - listing all jpg files in dir and subdirs -
How can I list all JPG files in the directory given in PHP5 and its subdirectories?
I thought I could write a globe pattern for it, but I can not understand it.
thanx, b.
You can use one with one:
Expand class image filter FilterIterator {accept public function () {$ file = $ this- & gt; GetInnerIterator () - & gt; (); Return preg_match ('/ .jpe? G $ / i', $ file- & gt; getFilename ()); }} $ It = new recurring directorytitle ('/ var / images'); $ $ = New Images Filter ($ $); Use foreign currency ($ $ as $ $) $ // $ file ...}
$ file
is an object.
Comments
Post a Comment