File_get_contents requests the url interface, and "requestresourceisnotfound" appears"

Source: Internet
Author: User
1. I tried to request this url in the browser, but there was no problem when I used file_get_contents. 2. Because the url contains many characters, I used urlencode format, but the request cannot be opened. 3. parameters need to be passed to this url interface. Some parameters include '| these characters, possibly... 1. I tried this url in the browser. The request is okay, but an error occurs when file_get_contents is used.
2. Because url parameters contain many characters, I have used the urlencode format, but the request cannot be opened.
3. You need to pass parameters to this url interface. Some parameters include = '| these characters. This may be the reason, but how can this problem be solved?
4. This is the url and the parameter exp:
Test. php? Exp = pid = "mm_26632469_12350536_47102560" % 20 | % 20pid = "mm_26632469_12350536_47114110 "....

Reply content:

1. I tried this url in the browser. The request is okay, but an error occurs when file_get_contents is used.
2. Because url parameters contain many characters, I have used the urlencode format, but the request cannot be opened.
3. You need to pass parameters to this url interface. Some parameters include = '| these characters. This may be the reason, but how can this problem be solved?
4. This is the url and the parameter exp:
Test. php? Exp = pid = "mm_26632469_12350536_47102560" % 20 | % 20pid = "mm_26632469_12350536_47114110 "....

UrlencodeCorrect usage

'Http: // www.test.com/path/to/test.php? A = '. urlencode ('axxxxxxx').' & B = '. urlencode ('bxxxxxxxx').' & c = '. urlencode ('cxxx ')
Related Article

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.