【发布时间】:2015-11-18 08:49:30
【问题描述】:
我在尝试使用 php 发送带有电子邮件的链接时遇到了一个奇怪的问题。此链接只会将用户带到“更新密码”表单。但是,当我单击该链接时,它会将我带到浏览器中名为“about:blank”的空白页面。我真的不明白为什么会这样......这是我的代码:链接的 html 在 $msg 变量中。
$to = $email;
$msg = "Hello $username, your pin # is $pin. Please remember this pin
because you will need it on the update password form. <br>
Please <a href = \"google.com\">click here</a> to be brought to the update password form.";
$header = 'MIME-Version: 1.0' . "\r\n";
$header .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$header .= 'From: ForgottenPassword@PHPGang.com' . "\r\n" .
'Reply-To: ForgottenPassword@PHPGang.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to,"Forgotten Password",$msg,$header);
我什至尝试将 google.com 作为目的地,但它仍然将我带到那个讨厌的 about:blank 页面。有什么想法吗?
【问题讨论】:
标签: php email hyperlink html-email