是否可以在 curl 发布请求中发送文件链接而不是内容?
$file_to_upload = array('file_contents'=>'@'.$file_name_with_full_path);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$target_url);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $file_to_upload);
$result=curl_exec ($ch);
curl_close ($ch);
echo $result;
我可以放一个链接而不是 $file_name_with_full_path 吗?