如何获得以下$ token来处理我的邮件

时间:2018-12-01 13:08:11

标签: php html

我正在尝试使以下内容起作用,但是我遇到了意外字符串的语法解析错误。我认为这可能是我的$ token变量,但是语法看起来正确。我以为您可以在$ token周围加上“ ..”?

$htmlContent = "<h1>Update your temporary password!</h1>
<p>You are receiving this email because you have changed your password. 
Your temporary password is: ".$token." \n\n However, for security purposes,
please make sure that you change to a new password by clicking on the link 
here <a href=http://www.pianocourse101.com/includes/changepassword.php?email=".htmlspecialchars($mailTo)."&temporarypassword=".htmlspecialchars($token)>Click here to change your password</a>;</p>";

1 个答案:

答案 0 :(得分:0)

您错过了".htmlspecialchars($token) 上的引号和concat运算符。” >Click here to change your password</a>;</p>";

如果您使用的代码编辑器的语法突出显示为Notepad++(Windows)或Gedit(Windows&Mac),则发现这些微小的编码错误会更容易。