PHP: function glob() on Windows - patterns with multiple ranges -


i want list of images in directory ($path). want perform case-insensitive research file extension. code below works on linux, not on windows.

foreach ( glob("$path/{*.[jj][pp][gg],*.[jj][pp][ee][gg],*.[gg][ii][ff],*.[pp][nn][gg],*.[bb][mm][pp],*.[tt][ii][ff][ff]}", glob_brace | glob_nocheck ) $file ) {     echo $file;  } 

i added glob_nocheck flag view computed patterns. here's response:

fotogallery/dir/[gg] fotogallery/dir/[gg] fotogallery/dir/[ff] fotogallery/dir/[gg] fotogallery/dir/[pp] fotogallery/dir/[ff] 

it seems last range ([...]) of each comma-separated expression considered! why happens?

thank you! :-)

this may fix problem

php manual comment sort of issue


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -