Random picture

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ampersand
Forum Commoner
Posts: 54
Joined: Thu Nov 28, 2002 2:00 am
Location: Norway

Random picture

Post by ampersand »

Hi!

Is it possible to show random images from a folder with subfolder? What I mean is that is should show from all of the subfolders too!

Best Regards
Blackhat
qartis
Forum Contributor
Posts: 271
Joined: Sat Dec 14, 2002 4:43 pm
Location: BC, Canada
Contact:

Post by qartis »

If you have nested subfolders (subfolders in subfolders, possibly many levels deep) your best bet may be to take the output of `ls -R` and explode it into directories, or if you want to stay strictly php, or are on a windows server, there are some good examples on http://www.php.net/dir
Post Reply