FILTER_SANITIZE_EMAIL 常量
FILTER_SANITIZE_EMAIL 常量将电子邮件地址中的所有非法字符删除。
返回值
FILTER_SANITIZE_EMAIL 常量不返回任何内容。
示例
<?php $myemail = "abc@demo//.com"; $myemail = filter_var($myemail, FILTER_SANITIZE_EMAIL); echo $myemail; ?>
输出
输出如下所示。
[email protected]
广告
FILTER_SANITIZE_EMAIL 常量将电子邮件地址中的所有非法字符删除。
FILTER_SANITIZE_EMAIL 常量不返回任何内容。
<?php $myemail = "abc@demo//.com"; $myemail = filter_var($myemail, FILTER_SANITIZE_EMAIL); echo $myemail; ?>
输出如下所示。
[email protected]