Find number of image files in a directory using php

by satheeshkumar 2012-12-26 11:02:19

Find number of image files in a directory using php,

$directory = "directory name";
if (glob($directory . "*.jpg") != false)
{
$filecount = count(glob($directory . "*.jpg"));
echo $filecount;
}

931
like
0
dislike
0
mail
flag

You must LOGIN to add comments