我正在学习sendemail,在我的展示模型中,我遇到了以下致命错误:
致命错误:C:\ Program Files(x86)\ EasyPHP-DevServer-14.1VC9 \ data \ localweb \ test \ email.phpon第11行超出最多执行时间30秒
<?php
if (isset($_POST ['submit'] ) ) {
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$comments = $_POST['comment'];
$to ="rzeb14@yahoo.com";
$headers ="From: $name<$email>";
$msg = "name: $name \n\n email: $email \n\n subject $subject \n\n comment $comments ";
if(mail($to, $subject, $msg , $headers))
{
echo "sendd msg";
}
else
{
echo "try again plz";
}
}
?>
<html>
<head><title>ghg</title></head>
<body>
<form action="" method="post">
<p>name:<br/>
<input type="text" name="name" id="" /> </p>
<p>email:<br/>
<input type="text" name="email" id="" /> </p>
<p>sub:<br/>
<input type="text" name="subject" id="" /> </p>
<p>comment:<br/>
<textarea name="comment" id="" cols="30" rows="10"></textarea> </p>
<p>
<input type="submit" value="sendemail" name="submit" /></p>
</form>
</body>
</html>