Friday, July 18, 2008

How to count no of files in a folder?

if (file_exists("../../uploads/dealerlogo/")){
$dh = opendir("../../uploads/dealerlogo/");
$filecount = 0;
while (($file = readdir($dh)) !== false) {
if(is_file("../../uploads/dealerlogo/".$file))
$filecount++;
}
}

Labels: , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home