reenadak

2019-05-04_counting files in a directory

May 4th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.18 KB | None | 0 0
  1. $fi = new FilesystemIterator(__DIR__, FilesystemIterator::SKIP_DOTS);
  2. printf("There were %d Files", iterator_count($fi));
  3. echo "<br>There are " . count(glob("*.jpg")) . " .jpg files.";
Advertisement
Add Comment
Please, Sign In to add comment