I'm trying to do a simple search of a specific folder to identify all JPG or GIF images. Here's the syntax I'm using:
$imageList = glob("$upload_dir{*.gif, *.JPG, *.jpg, *.GIF}", GLOB_BRACE);
I've also used this:
$imageList = glob($upload_dir."{*.gif, *.JPG, *.jpg, *.GIF}", GLOB_BRACE);
In either case, I only get back .gif images. If I swap the order of the extensions (i.e."{.jpg, .JPG, .gif, .GIF}"), I only get files that end with .jpg. It does not seem to be using all the patterns - only the first.
The php version is 4.4.0 on an Apache server.
Can anyone help?