keepAway Posted May 5, 2011 Share Posted May 5, 2011 How to count the number of files/images from a folder? Link to comment https://forums.phpfreaks.com/topic/235624-count-number-of-files/ Share on other sites More sharing options...
Maq Posted May 5, 2011 Share Posted May 5, 2011 Check out the glob function. Link to comment https://forums.phpfreaks.com/topic/235624-count-number-of-files/#findComment-1211041 Share on other sites More sharing options...
perky416 Posted May 5, 2011 Share Posted May 5, 2011 $dir_path = "/full/directory/path/"; $count = count(glob($dir_path . "*")); I believe you can replace the * with your file extensions if you only want to search for particular files. Link to comment https://forums.phpfreaks.com/topic/235624-count-number-of-files/#findComment-1211042 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.