其中: $name = preg_replace('/[\.\s+\?,\/"]/','_',$name); //change spaces\.\s+\?,\/"为正则表达式,表示查找. 空符号 ? / " 这五个字符 其他可自行添加,不明白的地方,可以参考下正则表达式有关的内容。 |
其中: $name = preg_replace('/[\.\s+\?,\/"]/','_',$name">
其中: $name = preg_replace('/[\.\s+\?,\/"]/','_',$name); //change spaces\.\s+\?,\/"为正则表达式,表示查找. 空符号 ? / " 这五个字符 其他可自行添加,不明白的地方,可以参考下正则表达式有关的内容。 |