php验证邮箱
更新:HHH   时间:2023-1-7


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;

}

}


返回web开发教程...