How does url-thinkphp obtain link parameters?

Source: Internet
Author: User
....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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.