Bu kod ile bir https URL'ye dosya göndermeye çalışıyorum:
$file_to_upload = array('file_contents'=>'@'.$target_path); 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $target_url); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSER, FALSE);
curl_setopt($ch, CURLOPT_UPLOAD, TRUE);
curl_setopt($ch, CURLOPT_POST,1); 
curl_setopt($ch, CURLOPT_POSTFIELDS, 'file='.$file_to_upload); 
$result = curl_exec($ch); 
$error = curl_error($ch);
curl_close ($ch); 
echo " Server response: ".$result; 
echo " Curl Error: ".$error;
Ama nedense ben bu yanıtı alıyorum:
Curl Error: Failed to open/read local data from file/application
Herhangi bir tavsiye teşekkürler yardımcı olacaktır!
GÜNCELLEME: Ben CURLOPT_UPLOAD dışarı çekerken, ben hedef sunucudan bir yanıt almak ama o yükü içinde hiçbir dosya olduğunu söylüyor