Home > Backend Development > PHP Tutorial > PHP过滤★等特殊符号的正则_php技巧

PHP过滤★等特殊符号的正则_php技巧

WBOY
Release: 2016-05-17 08:50:26
Original
986 people have browsed it
复制代码 代码如下:

if(preg_match("/[ '.,:;*?~`!@#$%^&+=)({}]|\]|\[|\/|\\\|\"|\|/",$user)){
echo '不要在名字里面整些特殊符号,请只使用字母、数字和汉字,当然要你的浏览器要选简体中文GB2312哟,千万不要选繁体、中文HZ等。返回修改后,再来,我等你哟!';
exit();
}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template