您现在的位置是:首页 > PHP技术PHP技术
php手机号码验证
2018-06-04【PHP技术】1562 人已围观
简介$mobile="12345678912"; if(preg_match("/^1[345789]{1}...
$mobile = "12345678912"; if(preg_match("/^1[345789]{1}\d{9}$/",$mobile)){ return true; }else{ return false; }
正则, "^"匹配开头,"$"匹配文本结尾
关注宁波网站建设博客,更多精彩分享,敬请期待!
Tags:
很赞哦! ()
上一篇:网站用户体验之见解
下一篇:IIS中多个版本php共存的方法
相关文章
随机图文
php变量布尔值验证详细参考
使用 PHP 函数对变量$x进行比较表达式gettype()empty()is_null()isset()boolean:if($x)$x ...Thinkphp更新数据时间字段的插入
thinkphp在处理数据写入数据库时同时记录操作时间,可以用$arr['add_time'] = time();或date...thinkphp imagettftext(): Could not find/open font验证码无法显示报错
thinkphp imagettftext(): Could not find/open font tp5.1验证码无法显示.打开debu...PHP str_pad函数使用注意点
定义和用法str_pad() 函数把字符串填充为新的长度。语法str_pad(string,length,pad_string,pad_ty...