function scan_dir($path){
$dir = $path."/"; // dir location
$files = glob("$dir*.*");
$count = $files !== false ? count($files) : 0;
return $count;
}
echo scan_dir("/folder");function scan_dir($path){
$dir = $path."/"; // dir location
$files = glob("$dir*.*");
$count = $files !== false ? count($files) : 0;
return $count;
}
echo scan_dir("/folder");