匹配非法文件名時(shí),/和\不能匹配
其他非法字符都可以匹配,/和\,創(chuàng)建文件時(shí)提示“文件已存在,請重命名之后創(chuàng)建”,已經(jīng)用了轉(zhuǎn)義,這是basename的影響么?
basename($path, $suffix)?
Returns trailing name component of path
參數(shù):
path string
A path.
On Windows, both slash (/) and backslash (\) are used as directory separator character. In other environments, it is the forward slash (/).
suffix string[optional]
If the name component ends in suffix this will also be cut off.
返回:
string the base name of the given path. ?
怎么解決/和\匹配問題?
2015-08-12
因?yàn)閎asename函數(shù)過濾掉了/和\