网址链接中出现%27错误

0 php mysql url

当用户注册到我的网站并且激活链接发送到他们的电子邮件时...显示未找到页面错误

原始激活链接

http://tc14.wceeesa.org/activate.php?email='akshaypp%40mail.com'&key='d6433fa355d81e942b3ba0b845de089e'

它的表演像

tc14.wceeesa.org/activate.php?email= **%27** akshaypp%40mail.com **%27** &key= **%27** d6433fa355d81e942b3ba0b845de089e **%27**

告诉我如何解决此代码。...并删除%27%的链接

我的PHP代码

$message = "To Activate your account, please click on this link: \n \n";
$message .= "http://tc14.wceeesa.org/activate.php?email='".urlencode($email)."'&key='".$activation."'";
mail($email,'Activation of your EESA Account',$message);
Run Code Online (Sandbox Code Playgroud)

Sna*_*yes 5

切勿在网址中加上引号,您可以使用分隔线短划线或下划线,如果不需要分隔符,则不要使用。

代替

http://tc14.wceeesa.org/activate.php?email='blah@blah.com'
Run Code Online (Sandbox Code Playgroud)

使用

http://tc14.wceeesa.org/activate.php?email=blah@blah.com   // quotes removed !
Run Code Online (Sandbox Code Playgroud)

或在您的PHP中

$message .= "http://tc14.wceeesa.org/activate.php?email=".urlencode($email)."&key=".$activation;   //without '
Run Code Online (Sandbox Code Playgroud)