我在我的vps上有plesk并在标题中升级了php,现在我的php表单脚本已经停止工作了。它进入电子邮件验证并返回电子邮件无效。它看起来好了 - 尝试了多个不同的preg_match字符串 - 任何想法。
if (!preg_match("/^[_\.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$/i", $email)) {
echo "<p>It appears you entered an invalid email address</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>";
}
elseif (!trim($name)) {
echo "<p>Please go back and enter a Name</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>";
}
elseif (!trim($email)) {
echo "<p>Please go back and enter an Email</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>";
}
elseif (!trim($telephone)) {
echo "<p>Please go back and enter a Telephone number</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>";
}
elseif (!trim($eventaddress)) {
echo "<p>Please go back and enter the Event address number</p><p><a href='javascript: history.go(-1)'><font color=\"orange\">Click here to go back</font></a></p>";
}