运行 ❯
获取您自己的
PHP
服务器
×
切换方向
切换主题,深色/浅色
转到空间
<!DOCTYPE html> <html> <body> <?php // Variable to check $email = "john.doe@example.com"; // Remove all illegal characters from email $email = filter_var($email, FILTER_SANITIZE_EMAIL); // Validate e-mail if (filter_var($email, FILTER_VALIDATE_EMAIL)) { echo("$email is a valid email address"); } else { echo("$email is not a valid email address"); } ?> </body> </html>
[email protected]
是合法的电子邮件地址