Code:
if(is_dir($dir)){

if(file_exists($dir.'/myFile.php')){ 

echo "Yes, there is a file named myFile.php";
}else{
echo "No, myFile.php is not there.";
}

}
The code above works file.

The would-be code below doesn't work correctly, but I hope it shows what I want.

Code:
if(is_dir($dir)){

if(file_exists($dir.'/'.*.*')){ 

echo "Yes, there is a file or subDirectory at least one or more than one."
}else{
echo "No, its empty.";
}

}
I like to get the directory is empty or NOT.