正则验证

来源:互联网 发布:2017淘宝秒杀软件 编辑:程序博客网 时间:2024/05/21 21:43
// if(preg_match('/^(13[0-9]|14[5|7]|15[0|1|2|3|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/',$_POST['tel'])){


if(!preg_match("/1[3458]{1}\d{9}$/",$_POST['tel'])){ 
    echo "电话错误";exit;
}
0 0
原创粉丝点击