PHP How to get file count in php codeigniter

$upOne = realpath(__DIR__ . '/../../../uploads');
$fi = new FilesystemIterator($upOne, FilesystemIterator::SKIP_DOTS);
printf("Total %d Files", iterator_count($fi));

Comments