guilmet Posted October 10, 2009 Share Posted October 10, 2009 i searched for this but can't find a clear answer. I want to take my index.php and have it list folders in that directory i did this a very long time ago, but can't remember how i did it. if someone could point me in the right direction, i'd appeciate it. thanks ron g Quote Link to comment https://forums.phpfreaks.com/topic/177167-list-a-directory/ Share on other sites More sharing options...
Garethp Posted October 10, 2009 Share Posted October 10, 2009 http://www.w3schools.com/php/php_ref_directory.asp Combined with is_file and is_dir for differentiation between folders and files Quote Link to comment https://forums.phpfreaks.com/topic/177167-list-a-directory/#findComment-934142 Share on other sites More sharing options...
guilmet Posted October 10, 2009 Author Share Posted October 10, 2009 thank you Garethp. I'll go have a look see. Quote Link to comment https://forums.phpfreaks.com/topic/177167-list-a-directory/#findComment-934143 Share on other sites More sharing options...
.josh Posted October 10, 2009 Share Posted October 10, 2009 print_r(glob('*',GLOB_ONLYDIR)); Quote Link to comment https://forums.phpfreaks.com/topic/177167-list-a-directory/#findComment-934145 Share on other sites More sharing options...
Daniel0 Posted October 10, 2009 Share Posted October 10, 2009 There is also the DirectoryIterator or RecursiveDirectoryIterator for more advanced stuff. Quote Link to comment https://forums.phpfreaks.com/topic/177167-list-a-directory/#findComment-934165 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.