Dekieon Posted April 8, 2007 Share Posted April 8, 2007 Is it possible to have php retrieve all the filenames in a folder and store the filenames in an array or something, so i could then store those in the database? If there is a way to do this, could I get an example on how to achieve it? Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 8, 2007 Share Posted April 8, 2007 stab in the dark instead of opening a .txt as a file, try opening the directory insted????? Quote Link to comment Share on other sites More sharing options...
AndyB Posted April 8, 2007 Share Posted April 8, 2007 @PC Nerd: if "stab in the dark" is the best you can do, it might be less confusing not to post a reply. @Dekieon: there are a number of examples you can find in the online manual. Stuff that is worth a look: http://ca.php.net/manual/en/function.readdir.php http://ca.php.net/manual/en/function.glob.php and (probably the fwrite/fread commands). Check the user-supplied notes in the manual. You'll probably find something that goes a long way to solving your coding problem. Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 8, 2007 Share Posted April 8, 2007 soz, trying to help, is it not what we do? Quote Link to comment Share on other sites More sharing options...
flash gordon Posted April 8, 2007 Share Posted April 8, 2007 http://actionscript.org/forums/showthread.php3?t=88941&highlight=files+directory Quote Link to comment Share on other sites More sharing options...
Dekieon Posted April 8, 2007 Author Share Posted April 8, 2007 thanks for the solution to my problem, now i can get back to programming 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.