文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>检查email地址格式的代码

检查email地址格式的代码

时间:2007-01-11  来源:mosquito_2006


这是一个完全符合RFC2822和RFC2821的代码。只检查单个email地址。
function check_email_address($email) {
// First, we check that there@#s one @ symbol, and that the lengths are right
if (!ereg("[^@]{1,64}@[^@]{1,255}", $email)) {
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
return false;
}
// Split it into sections to make life easier
$email_array = explode("@", $email);
$local_array = explode(".", $email_array[0]);
for ($i = 0; $i

相关阅读 更多 +
排行榜 更多 +
猴子很忙正版

猴子很忙正版

飞行射击 下载
召唤与合成2手机版

召唤与合成2手机版

休闲益智 下载
碧优蒂的世界免费版

碧优蒂的世界免费版

休闲益智 下载