我有这段代码用于电子邮件验证:
function VerifRegisterEmail(&$email) {
if(empty($email)) {
return false;
}
$pattern_email = '^[[:alnum:]\.-_]+@[[:alnum:]\.-_]+\.[[:alpha:]]{2, 3}$';
if(!ereg('^[[:alnum:]\.-_]+@[[:alnum:]\.-_]+\.[[:alpha:]]{2, 3}$', $email)) {
echo "emaill";
return false;
}
return true;
}
从这里我得到这个错误:
Warning: ereg() [function.ereg]: REG_BADBR in C:\Program Files\EasyPHP 2.0b1\www\polydotnet\controler\verif_formulaire.php on line 35
emaill- Email incorrecte
有什么线索吗?
谢谢