[PHP]
        标签:
        
2012-10-31 12:47
     
     PHP默认的file_exists和is_file在Windows下面是不区分大小写的,如果需要严格区分大小写的话,可以尝试使用下面的方法 
    
    
        
        |  | 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;
}
 | 
         
     
    
    最新评论
      · · · · · · 
    
(共0条)
 
目前还没有评论