开发者

send an url parameter to server from url (PHP/JavaScript)_

开发者 https://www.devze.com 2023-01-08 02:26 出处:网络
http://nomilead.com/create.php?uid=abc&key=c79a&web_url=http://dinesh707.blogspot.com/ Here im trying to send the url as a parameted \"web_url\". The shown is an ajax request that sends to a

http://nomilead.com/create.php?uid=abc&key=c79a&web_url=http://dinesh707.blogspot.com/

Here im trying to send the url as a parameted "web_url". The shown is an ajax request that sends to a php server back end.

from php end im trying to capture this by

$web_url  =开发者_JAVA技巧 $_GET["web_url"];

but it does not work.

Please help me out here.


You need to URLEncode web_url.

In PHP, that would be

$url = "http://...&web_url=".urlencode("http://dinesh707.blogspot.com/");

in Javascript

url = "http://...&web_url="+encodeURIComponent("http://dinesh707.blogspot.com/");


it must be $_GET

0

精彩评论

暂无评论...
验证码 换一张
取 消