function file_exists_case($filename) {
if (is_file($filename)) {
if (strstr(PHP_OS, 'WIN')) {
if (basename(realpath($filename)) != basename($filename))
return false;
}
return true;
}
return false;
}