|
-
Aug 10th, 2006, 06:30 AM
#1
Thread Starter
Hyperactive Member
PHP & .jpg files
I have a folder with a lot of .jpg picture files. I would like to acees one or two files at runtime randomly. Please tell me how should I make it.
-
Aug 10th, 2006, 09:52 AM
#2
Re: PHP & .jpg files
Use any directory reading method (see the PHP reference) to collect the names of all files into an array. Then use any random method (again, see the PHP reference: for example, there's a method for arrays that chooses n random entries) to select random entries.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Aug 13th, 2006, 05:30 AM
#3
Re: PHP & .jpg files
The picture in my signature does that with only one picture ata time. however, you can use PHP's Image functions to moasic two toghether.
http://adam.codedv.com/random/random.php?source
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|