if(!preg_match("/^13[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$|145[0-9]{8}$$/",$phone)){
echo "<script>alert(‘手机号不正确!‘)</script>";
echo "<script>location=‘register.php‘</script>";
exit;
}
php验证手机号是否正确
2022-10-04 14:10:01
2022-10-04 14:10:01