I have 4 folders that I want to check the images and php files in it. here is the structural folder arrangement.
The main_folder contains two sub-folder (second_folder and third_folder) while the third_folder contains a sub-folder (fourth_folder) and so on.
Currently with the code below, I can only access all the files in first_main_folder.
$files = glob('first_Main_folder/*.{jpg,png,gif,php}', GLOB_BRACE);
foreach($files as $file) {
echo "<br>$file<br>";
}
Please how do I access files in the remaining subfolders (second_folder, third_folder, fourth_folder) and so on
Thanks
first_Main_folder
test.png
data.php
check.gif
second_folder
tony.jpg
mark.gif
action.php
third_folder
index.php
post.php
sender.php
han.gif
fourth_folder
catch.php
index2.php
redirect.php
and so on