steepe Posted September 24, 2007 Share Posted September 24, 2007 I need a script that will go thru a particular folder and tell the contens of the document in that folder Link to comment https://forums.phpfreaks.com/topic/70467-working-with-file-and-operating-system/ Share on other sites More sharing options...
wildteen88 Posted September 24, 2007 Share Posted September 24, 2007 Have a read of the documentation for the following functions: opendir readdir Over at php.net. You'll find example code there (look in the user comments at the bottom of the page too). Link to comment https://forums.phpfreaks.com/topic/70467-working-with-file-and-operating-system/#findComment-354171 Share on other sites More sharing options...
steepe Posted September 25, 2007 Author Share Posted September 25, 2007 Thanks that really helped but what I ac. tually want is to store the contents of the documents in an array. Do u have any ideas? Link to comment https://forums.phpfreaks.com/topic/70467-working-with-file-and-operating-system/#findComment-354851 Share on other sites More sharing options...
trq Posted September 25, 2007 Share Posted September 25, 2007 file(). Link to comment https://forums.phpfreaks.com/topic/70467-working-with-file-and-operating-system/#findComment-354858 Share on other sites More sharing options...
jaymc Posted September 25, 2007 Share Posted September 25, 2007 $opendir = opendir("."); $readdir = readdir($opendir); $files = array(); while ($file = $readdir) {$files[] = file_get_contnts($file);} print_r($files); Havnt tested, something like that though right Link to comment https://forums.phpfreaks.com/topic/70467-working-with-file-and-operating-system/#findComment-354889 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.