[PHP] email 简单的php正则校验email地址的函数 →→→→→进入此内容的聊天室

来自 , 2020-10-29, 写在 PHP, 查看 109 次.
URL http://www.code666.cn/view/2ecd2bd9
  1. <?php
  2.     /* If you won't use filter_var() you should use this instead */
  3.     function isEmail($email)
  4.     {
  5.         if(preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email))
  6.         {
  7.             return true;
  8.         }
  9.         else
  10.         {
  11.             return false;
  12.         }
  13.     }
  14. ?>
  15.  

回复 "email 简单的php正则校验email地址的函数"

这儿你可以回复上面这条便签

captcha