This is a discussion on Glob() is Case Sensitive within the PHP Language forums, part of the PHP Programming Forums category; I have a search script on my site that uses glob(), how can I make it NON-Case Sensitive? Thanks ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
programthis@msn.com (Krhis) writes:
> I have a search script on my site that uses glob(), how can I make it > NON-Case Sensitive? Thanks for your help! I just experimented with glob() and gave up before I could figure it out. Here's a solution which uses the pear File_Find package: require_once 'File/Find.php'; $pedophilia = &File_Find::glob('/\.png$/i', "~/images", "perl"); This should match any files ending in .png, .Png, .pNg, etc. Also, this File_Find solution ought to be more portable since it doesn't rely on shell expansion. Untested, HTH. -- steven vasilogianis |