我正在尝试卷曲其名称包含特殊字符的文件
curl_setopt($curl_array[$i], CURLOPT_POST,1);
curl_setopt($curl_array[$i], CURLOPT_RETURNTRANSFER,TRUE);
curl_setopt($curl_array[$i], CURLOPT_MAXREDIRS,10);
curl_setopt($curl_array[$i], CURLOPT_TIMEOUT,3600);
curl_setopt($curl_array[$i], CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl_array[$i], CURLOPT_USERPWD, "$login:$password");
curl_setopt($curl_array[$i], CURLOPT_HTTPHEADER, array(
"cache-control: no-cache","content-type: multipart/form-data",
));
curl_setopt($curl_array[$i], CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_array[$i], CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl_array[$i], CURLOPT_SSLVERSION,3);
curl_setopt($curl_array[$i], CURLOPT_POSTFIELDS, $apiData);
此功能适用于任何文件,但文件名称中包含特殊字符 像
'file' =>'@/path-to-file/5@special!#$%^&_ = - Copy.txt'