验证手机号

admin2年前Laravel672


public function phone($phone)
{
   $pat = '/'
       . '^13\d{9}$'
       . '|^14[59]\d{8}$'
       . '|^15[^4]\d{8}$'
       . '|^16[2567]\d{8}$'
       . '|^17[0-8]\d{8}$'
       . '|^18\d{9}$'
       . '|^19[13589]\d{8}$'
       . '/';
   if (!preg_match($pat, trim($phone))) {
       return false;
   }
   return true;
}

返回列表

上一篇:上传图片

下一篇:抖音小程序码

相关文章

抖音小程序登录

$code = request()->input('code');$nickname = request()->input('nickName');$ava...

excel 导出

header("Content-Type: application/vnd.ms-excel; name='excel'"); header("Content-Disposition:atta...

微信支付V2

   public static function unifiedorder($openid, $out_trade_no, $total_fee, $notify)...

获取域名

/** * 获取域名 */public function domain(){    return request()->getSchemeAndHttpHost();}...

压缩图片

public static function size($id, $img) { try { list($width, $height, $img_type, $attr) = @getimages...

百度浏览器中视频悬浮

  <video class="html5-video"                poster=...