Urlencoded URL'ler için eğik çizgi Otomatik eklenmesi

0 Cevap php

Ben şu konuda çok karıştı:

echo("<a href='http://".urlencode("www.test.com/test.php?x=1&y=2")."'>test</a><br>");

echo("<a href='http://"."www.test.com/test.php?x=1&y=2"."'>test</a>");

The first link gets a trailing slash added (that's causing me problems) The second link does not.

Can anyone help me to understand why. Clearly it appears to be something to do with urlencode, but I can't find out what.

Thanks c

0 Cevap