//验证电话
private function reg_phone($phone){
if (preg_match("/^13[0-9]{1}[0-9]{8}$|15[0189]{1}[0-9]{8}$|189[0-9]{8}$/",$phone)) {
return true;
} else{
return false;
}
}
//验证邮箱
private function check_email($mail){
if(preg_match('/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/', $mail)){
return true;
}else{
return false;
}
}