首页 > file_get_contents请求url接口,出现“request resource is not found”

file_get_contents请求url接口,出现“request resource is not found”

1、我试过这个url在浏览器上请求没问题,但用file_get_contents就出错
2、由于url带的参数有很多字符,所以我用过urlencode格式过,但请求就打不开了
3、需要传参数到这个url接口,有些参数带 =’|| 这些字符,可能这个就是原因,但是要怎么处理
4、这个是url及所带的参数exp:
test.php?exp=pid=="mm_26632469_12350536_47102560"%20||%20pid=="mm_26632469_12350536_47114110"....


urlencode的正确用法

'http://www.test.com/path/to/test.php?a='.urlencode('axxxxxxx').'&b='.urlencode('bxxxxxxx').'&c='.urlencode('cxxxxx')
【热门文章】
【热门文章】