如何移除curl句柄中的CURL_FILE句柄


how to remove CURL_FILE handle from curl handle?

curl_setopt($ch, CURLOPT_FILE, null);curl_setopt($ch, CURLOPT_FILE, false);得到Warning: curl_setopt(): supplied argument is not a valid File-Handle resource

没有说明如何完全删除对文件句柄的引用。

根据http://php.net/manual/en/function.curl-setopt.php,您应该将其更改为STDOUT,这是默认的。或者,如果您对输出不感兴趣,您可以将其更改为/dev/null