url地址中&转义成&的复原方法

作者:星辰网络工作室 日期:2019-06-05 浏览:5093

  传的原参数“http://thirdqq.qlogo.cn/g?b=oidb&k=kHRuu5xxTOcXog6lrEMq4A&s=40”

  接受的参数“http://thirdqq.qlogo.cn/g?b=oidb&k=kHRuu5xxTOcXog6lrEMq4A&s=40”

  ‘&’被转义成了‘&’,

  所以 file_get_contents()在获取内容的时候就报错了, failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Req

  解决办法:

  htmlspecialchars_decode()