view all .jpg files in a directory with php


#1

I’m trying to create a Photo Gallery for my site with PHP and MySQL, and I don’t know how to write the php script to select every .jpg file from a directory on the server! Could somebody help me!?


#2

To start with read up on http://us2.php.net/dir . That should give you what you need to get you going. When you have a code sample that won’t work just right, then come back and post it and we will try and help.

Please don’t ask us to write your script for you. Give us something to HELP you with.


#3

Hmmm - maybe glob()…

“A script, A script - My kingdom for a script” ;)