$dir = "upload/";
if (is_dir($dir)){
if ($dh = opendir($dir)){
while (($file = readdir($dh))!= false){
if(!is_dir($file)) {
$filePath = $dir.$file;
echo "
";
}
}
closedir($dh);
}
}