Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 21st, 2004, 12:34 PM
Registered User
Join Date: Jul 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Random images straight from folder

Is there anyway to use PHP to check a folder in the server, count the images and randomly show one every time the page loads? That way new images can be uploaded into the folder and automatically be added to the rotation.

If not mentioned above, what functions should I be looking at to check specific folders and create an array from the filenames?

Old July 21st, 2004, 01:43 PM
Friend of Wrox
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts

I suggest you check out the notes at the bottom of http://us2.php.net/manual/en/function.readdir.php . Most of them are pretty helpful.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Corporate Images Folder Not Found! sprdave BOOK: Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 ISBN: 978-0-470-12449-9 2 April 19th, 2008 08:00 PM
Get images from folder surendran ActionScript 1 December 12th, 2007 11:55 PM
Problem with random number while uploading images! ostwald ASP.NET 1.x and 2.0 Application Design 4 September 30th, 2007 05:33 AM
images folder Lee jonesy Dreamweaver (all versions) 7 September 12th, 2004 01:35 PM
Reading images straight from datastream shinmai PHP How-To 4 December 16th, 2003 05:21 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.