PHP邮箱地址正确性验证示例
时间:2021-07-01 10:21:17
帮助过:4人阅读
- /**
- * 验证邮箱格式
- * edit: bbs.it-home.org
- */
- $email="testgdy_007@163.com";
- if (preg_match("/[a-zA-Z0-9]+@[a-zA-Z0-9]+\.[a-z]{2,4}/",$email,$mail)){
- echo 'yes
'; - }else{
- echo 'no
'; - }
- echo "\$email??".$email."<>";
- echo "\$mail??".$mail;
- ?>
|