WIN环境下文件名大小写严格检测使用效率更高的PHP函数

This commit is contained in:
麦当苗儿
2013-04-17 10:08:39 +08:00
parent f62cd9ed28
commit d144aaa6a7

View File

@@ -33,7 +33,7 @@ class Loader {
$filename = $path . str_replace('\\', '/', $class) . EXT; $filename = $path . str_replace('\\', '/', $class) . EXT;
if(is_file($filename)) { if(is_file($filename)) {
// Win环境下面严格区分大小写 // Win环境下面严格区分大小写
if (IS_WIN && !strstr(str_replace('/', '\\', realpath($filename)), $class . EXT, true)){ if (IS_WIN && false === strpos(str_replace('/', '\\', realpath($filename)), $class . EXT)){
return ; return ;
} }
include $filename; include $filename;