Find images with certain extensions recursively
问题 I am currently trying to make a script that will find images with *.jpg / *.png extensions in directories and subdirectories. If some picture with one of these extensions is found, then save it to an array with path, name, size, height and width. So far I have this piece of code, which will find all files, but I don't know how to get only jpg / png images. class ImageCheck { public static function getDirectory( $path = '.', $level = 0 ){ $ignore = array( 'cgi-bin', '.', '..' ); // Directories