This is a discussion on random file from subdirectories? within the PHP Language forums, part of the PHP Programming Forums category; Hi, how would I make a script that pics a random file from a tree? Is there something like this ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
In article <Xns93F5AF545EAE3oliveremailch@63.223.5.254>, Oliver Spiesshofer wrote:
> Hi, > > how would I make a script that pics a random file from a tree? > Is there something like this existing? I need one that can handle many > files on a large tree. Read all filenames into an array using readdir et al, and then $random_file = array_rand($all_files); |