|
Posted by Fred Atkinson on 03/02/07 19:20
I need a PHP script that can be invoked refererencing a
subdirectory where thumbnails are stored and have it randomly display
one of those thumbnails.
To expand upon my needs, here is the hierarchy of the Web
site:
main pages public_html
subpages apple banana coconut
sub-subpages aa bb cc dd ee ff gg
Each of the aa-gg subdirectories will contain thumbnail .jpg
files. I'd like to be able to invoke the script quite a few times
within the same PHP page.
Example:
From the page in /banana, use <?php random_image $dir=aa> to
return a thumbnail that it randomly took from sub page /banana/aa. I
would invoke a thumbnail from another directory by changing aa to bb,
cc, dd, ee, ff, or gg.
So far, every script I've looked at I haven't quite been able
to make work.
Though I have written a few PHP scripts, I am a PHP novice and
I need to 'keep it simple' so I can repeatedly use the script in the
page.
If the script is above the <html> tag and can be called from
within the actual page, that should work fine for my purposes.
Thanks for any help you can provide.
Regards,
Fred
Navigation:
[Reply to this message]
|