lamaboy20 Posted March 16, 2007 Share Posted March 16, 2007 Hello All! Is there anyway someone could provide code to a soultion i need here. Basically i have a directory of all these files uploaded, and i need some sort of way for a php file to list all the items in that directory somehow, it doesent need to be special, i just need them listed so my users can see what is uploaded into that directory. Any ideas?? thanks guys! Link to comment https://forums.phpfreaks.com/topic/42997-file-listbox-of-directory/ Share on other sites More sharing options...
per1os Posted March 16, 2007 Share Posted March 16, 2007 http://us3.php.net/manual/en/class.dir.php Link to comment https://forums.phpfreaks.com/topic/42997-file-listbox-of-directory/#findComment-208822 Share on other sites More sharing options...
lamaboy20 Posted March 16, 2007 Author Share Posted March 16, 2007 hmm i have that code and when i execute it..it does noething. Is there something i have to add/modify here other then just the dir name. I know php but this looks odd to me. :-\ Link to comment https://forums.phpfreaks.com/topic/42997-file-listbox-of-directory/#findComment-208831 Share on other sites More sharing options...
lamaboy20 Posted March 16, 2007 Author Share Posted March 16, 2007 nvm i got it now is there a way to organize this data some how using this following code <?php $d = dir("/etc/php5"); echo "Handle: " . $d->handle . "\n"; echo "Path: " . $d->path . "\n"; while (false !== ($entry = $d->read())) { echo $entry."\n"; } $d->close(); ?> Link to comment https://forums.phpfreaks.com/topic/42997-file-listbox-of-directory/#findComment-208835 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.