HOME
DOMAIN
WEB HOST
AUTO Site
VPS SERVER
CLOUD HOST
SERVER
HK HOST
AGENT
SERVICE
一个简单PHP验证邮箱合法性的函数,功能很全,记下备用,函数代码如下:
$mail = 'wan.ch_un0222@126.qq.com'; function vaildEmail($mail){ //验证邮箱 if (emptyempty($mail) || !preg_match("/^[-a-zA-Z0-9_.]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,5}$/",$mail)){ return false; }else{ return true; } }