首页 > 代码库 > php验证邮箱

php验证邮箱

public function isEmail($email){ //验证邮箱

$chars = "/([a-z0-9]*[-_\.]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[\.][a-z]{2,3}([\.][a-z]{2})?/i";

if(preg_match($chars,$email)){

return true;

}else{

return false;

}

}


php验证邮箱