サードパーティのPHPクラスを使用してAPIにアクセスしていますが、次のコードがあります。
$fh = fopen('php://memory', 'w+');
fwrite($fh, $xml);
rewind($fh);
$ch = curl_init($req->to_url() );
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_PUT, true);
curl_setopt($ch, CURLOPT_INFILE, $fh);
最後の行、つまりこれは次のとおりです。
curl_setopt($ch, CURLOPT_INFILE, $fh);
エラーが発生しました:
警告:curl_setopt()[function.curl-setopt]:タイプMEMORYのストリームをSTDIOファイルとして表すことはできません*
私は何が間違っているのですか?