Glob() is Case Sensitive

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Krhis

    Glob() is Case Sensitive

    I have a search script on my site that uses glob(), how can I make it
    NON-Case Sensitive? Thanks for your help!

    Krhis
  • Steven Vasilogianis

    #2
    Re: Glob() is Case Sensitive

    programthis@msn .com (Krhis) writes:
    [color=blue]
    > I have a search script on my site that uses glob(), how can I make it
    > NON-Case Sensitive? Thanks for your help![/color]

    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::glo b('/\.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

    Comment

    Working...