show random images


Posted on 16th Feb 2014 07:03 pm by admin

hey guys

can someone please suggest a way in which the following code can be edited so it only picks up .jpg files, and so it only shows 20 of them which where found, in a randomized order

Code: <?php
$files = new RecursiveDirectoryIterator("./gallery");
foreach(new RecursiveIteratorIterator($files) as $files)
{
$file = basename($files);
echo ''.$file.'<br/>';
}
?>


thanks everyone

No comments posted yet

Your Answer:

Login to answer
190 Like 39 Dislike
Previous forums Next forums
Other forums

how to load a Sys file with system load and call images?
normally you need register the module as a service with CreateService, and start the service

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

What is SAP Avatar ?
Hi All,

This G.Satish , my boss asked me to explore on SAP Avatar. I searced in internet

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

Simple Question
I know this is a simple question, that if I knew what it was technically called i could probably loo

Database 'Validation'
Hi everyone,
I'm trying to validate the password entered by the user with the password in the dat

Why doesn't this work? (SSH2)
This is my script:

Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);

mysql_real_escape_string making variable equal nothing
i post a form and i post the variable:
Code: $var = $_POST[variable];then i echo $var its what i

Help on code output
My CODE:

Code: [Select] echo "<phone>".$line["phone"].&qu

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash