<?php
$email = 'test@126.c.om';
function testEmail($email)
{
//格式验证
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
return '邮箱格式有误!';
}
//dns验证
$mail = explode('@', $email);
$email = $mail[1];
if (!checkdnsrr($email,'ANY')) {
return '无效邮箱!请核对邮箱地址'...