复制代码 代码如下:
<?
@header('content-type:text/html;charset=utf-8;');
$email_a='jcifox@gmail.com';
$email_b='@jcifox@gmail.com';
$email_c='jcifoxgmail.com';
$ip_a='0.0.0.0';
$ip_b='255.255.255.255';
$ip_c='0.0.0.265';
echo $email_a.' : ';
echo (filter_var($email_a,FILTER_VALIDATE_EMAIL))?'is valid':'is not valid';
echo '<br /><br />';
echo $email_b.' : ';
echo (filter_var($email_b,FILTER_VALIDATE_EMAIL))?'is valid':'is not valid';
echo '<br /><br />';
echo $email_c.' : ';
echo (filter_var($email_c,FILTER_VALIDATE_EMAIL))?'is valid':'is not valid';
echo '<br /><br />';
echo $ip_a.' : ';
echo (filter_var($ip_a,FILTER_VALIDATE_IP))?'is valid':'is not valid';
echo '<br /><br />';
echo $ip_b.' : ';
echo (filter_var($ip_b,FILTER_VALIDATE_IP))?'is valid':'is not valid';
echo '<br /><br />';
echo $ip_c.' : ';
echo (filter_var($ip_c,FILTER_VALIDATE_IP))?'is valid':'is not valid';
?>
新闻热点
疑难解答