更新时间:2022-03-11 07:44:32
在之前插入curl_exec()
:
curl_setopt($ch,CURLOPT_HEADER,true);
而不只是 echo
'结果,也将标题转发给客户端:
Instead of just echo
'ing the result, forward the headers to the client as well:
list($headers,$content) = explode("\r\n\r\n",$result,2);
foreach (explode("\r\n",$headers) as $hdr)
header($hdr);
echo $content;