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? Link to comment https://forums.phpfreaks.com/topic/46145-retrieving-filenames-from-a-folder/ 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????? Link to comment https://forums.phpfreaks.com/topic/46145-retrieving-filenames-from-a-folder/#findComment-224286 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. Link to comment https://forums.phpfreaks.com/topic/46145-retrieving-filenames-from-a-folder/#findComment-224314 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? Link to comment https://forums.phpfreaks.com/topic/46145-retrieving-filenames-from-a-folder/#findComment-224315 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 Link to comment https://forums.phpfreaks.com/topic/46145-retrieving-filenames-from-a-folder/#findComment-224335 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 Link to comment https://forums.phpfreaks.com/topic/46145-retrieving-filenames-from-a-folder/#findComment-224410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.