共有1【preg_replace】相关的内容

php过滤所有特殊字符的函数,在中文用户名时用到。 代码如下: function replace_specialChar($strParam){$regex = "/\/|\~|\,|\。|\!|\?|\“|\”|\【|\】|\『|\』|\:|\;|\《|\》|\’|\‘|\ |\·|\~|\!|\@|\#|\\$|\%|\^|\|\*|\(|\)|\_|\+|\{|\}|\:|\|\|\?|\[|\]|\,|\.|\/|\;|\'|\`|\-|\=|\\\|