Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有替代方案filter_var($email, FILTER_VALIDATE_EMAIL)吗?
filter_var($email, FILTER_VALIDATE_EMAIL)
因为它似乎没有将我们这样的案例美洲@hotmail(例如没有 .com)识别为无效地址。
我的代码:
$c = 0; $email = $_POST["ml"]; if(!filter_var($email, FILTER_VALIDATE_EMAIL)){ $c = 1; // Email non valida }
你可能做错了什么,因为它确实认为这样的地址是无效的。自己试试吧。