I\'m trying to think of the fastest way to implement a case insensitive file_exists function in PHP. Is my best bet to enumerate the file in the directory and do a strtolowe
//will resolve & print the real filename $path = "CaseInsensitiveFiLENAME.eXt"; $dir = "nameOfDirectory"; if ($handle = opendir($dir)) { while (false !== ($entry = readdir($handle))) { if (strtolower($path) == strtolower($entry)){ echo $entry ; }} closedir($handle); }