即使腳本運行成功,我也會收到錯誤消息。它正在做我想要它做的事情,但我得到了一個令人討厭的錯誤。PHP電子郵件錯誤
我的代碼如下:
<
?php
$title = $_REQUEST['title'];
$name = $_REQUEST['name'];
$surname = $_REQUEST['surname'];
$email = $_REQUEST['email'];
$username = $_REQUEST['username'];
$password = md5($_REQUEST['password']);
$con = mysql_connect("*******","**","***");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db('****', $con);
$sql="INSERT INTO Users (title, firstname, surname, email, username, password, role) VALUES ('$title','$name', '$surname','$email','$username','$password', 'normaluser')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
$username = $_REQUEST["username"];
$password = $_REQUEST["password"];
$confirmpass = 'password:';
ini_set ("sendmail_from","[email protected]");
$messege = "Hi $name $surname, \n\r\n\r Thanks For Registering.\n\r\n\r Your Username: $username \n\r\n\r Your Password: $password \n\r\n\rRemember To Start Booking Your Desired Meetings!!!";
$to= "$email";
$from = '[email protected]';
$subject="Registration Success";
mail($to,$message,$subject,$from);
echo "Thanks $surname, You Have Successfully Registered! </br> </br> Please Check Your Email!";
mysql_close($con)
?>
的錯誤是:Fatal error: Maximum execution time of 30 seconds exceeded in E:\webareas\hj942\CW\meetings\conference\Register\register_success.php on line 67
行67是行之後:
回聲「感謝$姓,你已經成功註冊,請檢查你的郵件!」;
這是一個空行!它沒有任何關係。
有幫助嗎?
'$ messege'和'$ message'的不同類型在這裏還是在生產代碼中只是一個錯誤? – fkerber 2012-01-08 21:53:56
-1。壞問題。你實際上沒有__reading__錯誤信息,只告訴我們它是「討厭的」。 – jmkeyes 2012-01-08 21:54:49
@fkerber,斑點。謝謝 – user1114080 2012-01-08 21:58:17