Skip to content

Instantly share code, notes, and snippets.

@jk2K
Created March 19, 2014 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jk2K/9636889 to your computer and use it in GitHub Desktop.
Save jk2K/9636889 to your computer and use it in GitHub Desktop.
验证邮箱是否正确
function isemail($email) {
return strlen($email) > 6 && strlen($email) <= 32 && preg_match("/^([A-Za-z0-9\-_.+]+)@([A-Za-z0-9\-]+[.][A-Za-z0-9\-.]+)$/", $email);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment