php - Is there away to get folder names inside another folder? -
i searching way folder names inside folder
to clear want do:
i have folder located in desktop named 'myfiles' under folder have tree folders 'home','school' , 'student'
is possible names of tree folders inside 'myfiles' , echo them using php?
'myfiles' pure files = **c:\users\sullanob\desktop\myfiles**
in way can monitor , organized folders using web based application
thanks in advance..
you can use php's scandir function.
function listsubfolders($path) { return array_diff(scandir($path), array('.','..')); } var_dump(listsubfolders('c:/users/sullanob/desktop/myfiles'));
Comments
Post a Comment