Glob() is Case Sensitive

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-26-2003
Krhis
 
Posts: n/a
Default 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
Reply With Quote
  #2 (permalink)  
Old 07-26-2003
Steven Vasilogianis
 
Posts: n/a
Default Re: Glob() is Case Sensitive

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:38 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0