Glob

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please can someone help me understand the following:
I have 4 images with a .jpg extension in a folder.
The following reads all four:
$files = glob("thumbs/{*.gif,*.jpg,}",GLOB_BRACE);

All good, however, I noticed that if the extension is in capital
letters, eg .JPG it doesn't work. Apparently this is because when
using *. in glob it's case-sensitive (I have RTFM/STFW)

So, I would expect the following to work, but it's reading each image twice!
$files = glob("thumbs/{*.gif,*.jpg,*.jpeg,*,png}",GLOB_BRACE);

What am I missing?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux