I have a path of file that I stored into a table database like this :
D:/XAMPP/htdocs/develop_tsurumaru/assets/iwwi_file/DO_FOLDER/Damage_Report/0080//thumbs/thumb_52.jpg
You know, this path is a string type now. How to get its directory, which is :
D:/XAMPP/htdocs/develop_tsurumaru/assets/iwwi_file/DO_FOLDER/Damage_Report/0080//thumbs/
Thanks
If you want to get a list of all the files and folders under thumbs
folder, then follow the below code.
<?php
$dir = 'D:/XAMPP/htdocs/develop_tsurumaru/assets/iwwi_file/DO_FOLDER/Damage_Report/0080//thumbs';
$files = scandir($dir);
print_r($files); // This will print an array with all the files and folders
?>