我是新手,我cURL
指的是这个例子:http ://www.php.net/manual/en/book.curl.php#99979
我想编写以下 curl 请求:
curl "http://localhost:8080/solr/update/extract?literal.id=doc1&commit=true" -F "myfile=@test.pdf"
使用 curl 预定义的常量。(http://www.php.net/manual/en/curl.constants.php)
我开始写:
$tuCurl = curl_init();
curl_setopt($tuCurl, CURLOPT_URL, "http://localhost:8080/solr/update/extract?literal.id=doc1&commit=true");
但是,在那之后,我无法弄清楚如何写-F "myfile=@test.pdf"
部分。