对不起我的英语。
我用php建立了一个链接。我通过电子邮件发送。有时链接(在电子邮件中)已损坏。
当我单击(或复制到浏览器)时,已在随机位置插入了一个空白区域。
任何想法?
生成邮件,代码如下:
$url="www.example.com/dir/subdir/page.php?param1=$p1¶m2=$p2¶m3=$p3[...]¶m20=$p20";
[...]
$body .= "<td><a href=\"$url\">";
$body .= htmlentities($url,ENT_NOQUOTES,'ISO-8859-1');
$body .= "</a></td>";
[...]
$headers = "From: $companyName < $companyMail > \r\n";
$headers .= "Reply-To: $companyMail \r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1 ";
$headers .= "Content-Type: text/html; charset=ISO-8859-1";
$headers .= "MIME-Version: 1.0 ";
mail($client, "Confirmaton", $body, $headers);
page.php 上的示例接收参数
代码:
echo "<pre>Request:<br>";
print_r($_REQUEST);
echo "</pre><br>";
exit;
case OK:
Request:
Array
(
[p1] => value1
[p2] => value2
[p3] => value3
[p3] => value5
[p4] => value6
[p5] => value7
(...)
[p20] => value20
)
Error1 (link with space in value)
Request:
Array
(
[p1] => value1
[p2] => val ue2
[p3] => value3
[p3] => value5
[p4] => value6
[p5] => value7
(...)
[p20] => value20
)
Error2 (link with space in variable)
Request:
Array
(
[p1] => value1
[p2] => value2
[p_3] => value3
[p3] => value5
[p4] => value6
[p5] => value7
(...)
[p20] => value20
)