84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
开发的程序要运行在多平台,平时项目组在win下开发,经常有文件名大小写问题到其他平台发布时才会遇到。
如果能加一个判断大小写的函数,如果读取文件时大小写不一致直接报错,这样在开发阶段就可以直接发现了。
光阴似箭催人老,日月如移越少年。
The win32 GetFullPathName API can be used under windows. For example, realpath in php uses this:
GetFullPathName
realpath
TSRM_API char *realpath(char *orig_path, char *buffer) { int ret = GetFullPathName(orig_path, _MAX_PATH, buffer, NULL); if(!ret || ret > _MAX_PATH) { return NULL; } return buffer; }
Reference:
GetFullPathName - MSDN
php-srcTSRMtsrm_win32.c
The win32
GetFullPathName
API can be used under windows. For example,realpath
in php uses this:Reference:
GetFullPathName - MSDN
php-srcTSRMtsrm_win32.c