gorskyLTD Posted November 24, 2006 Share Posted November 24, 2006 Hi, i have created user registration form, and user can upload files to directory!I know how to find path to that folder, but how can i return all files that are in this folder, in some kind of array, or there is other posibilities to do that?Thanks Quote Link to comment Share on other sites More sharing options...
taith Posted November 24, 2006 Share Posted November 24, 2006 easiest function is glob()... takes all the files in a directory, adds them to an array :-D Quote Link to comment Share on other sites More sharing options...
gorskyLTD Posted November 24, 2006 Author Share Posted November 24, 2006 hmm, it takes all files from my root doc, but can i use it to search in specific folder? Quote Link to comment Share on other sites More sharing options...
taith Posted November 24, 2006 Share Posted November 24, 2006 yes[code]$files=glob("lib/*.php");[/code] Quote Link to comment Share on other sites More sharing options...
gorskyLTD Posted November 24, 2006 Author Share Posted November 24, 2006 thanks, it realy helped! great forum!Thanks Quote Link to comment 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.