Advertisement
Isigar

[PHP] countFiles()

Feb 11th, 2015
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.19 KB | None | 0 0
  1. private function countFiles($path)
  2.     {
  3.         $count = 0;
  4.         $scan = scandir($path);
  5.         foreach($scan as $files)
  6.         {
  7.             if(is_file($path.$files))
  8.             {
  9.                 $count++;
  10.             }
  11.         }
  12.         return $count;
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement