匹配非法文件名時,/和\不能匹配
其他非法字符都可以匹配,/和\,創建文件時提示“文件已存在,請重命名之后創建”,已經用了轉義,這是basename的影響么?
basename($path, $suffix)?
Returns trailing name component of path
參數:
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
因為basename函數過濾掉了/和\