curl提示“Failed writing header”,什么叫“没有写标题!” (≖ ‿ ≖)✧ 噗~


代码如下

   
  $curl = curl_init (); // 启动一个CURL会话
  
curl_setopt ( $curl, CURLOPT_URL, $url );
curl_setopt ( $curl, CURLOPT_HEADERFUNCTION, function($ch, $str){} );

抛出错误:

Failed writing header

请问这是怎么回事?

php curl

轻轻地发帖 10 years, 7 months ago

我明白了,我设置CURLOPT_HEADER, FALSE,ture就可以了

ooxxoo answered 10 years, 7 months ago

Your Answer