....Urlwww.baidu.com $ url $ _ GET [& #039; url & #039;]; or $ urlI (& #039; request. url & #039;); printed out only http: I want to ask how to get the link www.baidu.com http ://.... /url/http://www.baidu.com
$ Url = $ _ GET ['URL'];
Or
$ Url = I ('request. URL ');
Only http is printed:
I want to ask how to get the http://www.baidu.com link
Reply content:
Http: //.../url/http://www.baidu.com
$ Url = $ _ GET ['URL'];
Or
$ Url = I ('request. URL ');
Only http is printed:
I want to ask how to get the http://www.baidu.com link
Add directly after the link? Url = urlencode ("http://baidu.com"), do not pass this parameter in/a/B format
Use encode to convert the url you want to obtain?
var_dump( parse_url($_SERVER['HTTP_REFERER']) );
The urlencode function in thinkphp is faulty.
This is how I solve it.
Url = str_replace ("//", "%", "http://baidu.com"); // % you can set it by yourself
You can replace it later