匹配非法文件名时,/和\不能匹配
其他非法字符都可以匹配,/和\,创建文件时提示“文件已存在,请重命名之后创建”,已经用了转义,这是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.
怎么解决/和\匹配问题?