if(file_exists('test.php')){echo 'yes';}else{echo 'no';}
The code above find whether the file name “test.php” is or not.
I like to find whether a file name which has “s” in the 3rd and 4th is or not.
The following code doesn’t work correctly but I hope it shows what I want.
if(file_exists('S in the 3rd and 4th')){echo 'yes';}else{echo 'no';}
if there is only a file named “test.php” in the folder, it will echo “yes”.
if there is only a file named “moist.php” in the folder, it will echo “no”.
if there is only a file named “past.php” in the folder, it will echo “yes”.
if there is only a file named “study.php” in the folder, it will echo “no”.
How can I check whether there is a file which has “s” in the 3rd, or not?