KingOfHeart Posted December 28, 2009 Share Posted December 28, 2009 How would I return the folder I'm currently viewing? Now the entire directory, just the folder. Link to comment https://forums.phpfreaks.com/topic/186470-get-current-folder/ Share on other sites More sharing options...
trq Posted December 28, 2009 Share Posted December 28, 2009 Directories and Folders are two different names for the same thing so I'm not exactly sure what you mean. Maybe getcwd is what your after? Link to comment https://forums.phpfreaks.com/topic/186470-get-current-folder/#findComment-984667 Share on other sites More sharing options...
Catfish Posted December 28, 2009 Share Posted December 28, 2009 i think he meant, not the entire directory listing, just the name of the current working directory, which you answered. Link to comment https://forums.phpfreaks.com/topic/186470-get-current-folder/#findComment-984669 Share on other sites More sharing options...
KingOfHeart Posted December 28, 2009 Author Share Posted December 28, 2009 He partly answered. In the example it shows this /home/thegamin/public_html/openzelda/QuestPackFiles/Sounds It returns this. Let's say I want to return everything after "QuestPackFiles/" In the meantime I'll use substr, but let's say I didn't know the length of the path. What method would I use then? Link to comment https://forums.phpfreaks.com/topic/186470-get-current-folder/#findComment-984695 Share on other sites More sharing options...
trq Posted December 28, 2009 Share Posted December 28, 2009 basename. Link to comment https://forums.phpfreaks.com/topic/186470-get-current-folder/#findComment-984698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.