-
Anonymous
Загрузка файлов cURL больше не работает после обновления с PHP 5.5 до 5.6
Сообщение
Anonymous »
У меня произошел сбой загрузки cURL после обновления PHP 5.5 до 5.6:
Код: Выделить всё
$aPost = array(
'file' => "@".$localFile,
'default_file' => 'html_version.html',
'expiration' => (2*31*24*60*60)
)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128);
curl_setopt($ch, CURLOPT_POSTFIELDS, $aPost);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$sResponse = curl_exec ($ch);
В целевой системе файл кажется пустым.
Подробнее здесь:
https://stackoverflow.com/questions/259 ... 5-5-to-5-6
1719143759
Anonymous
У меня произошел сбой загрузки cURL после обновления PHP 5.5 до 5.6:
[code]$aPost = array(
'file' => "@".$localFile,
'default_file' => 'html_version.html',
'expiration' => (2*31*24*60*60)
)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiurl);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_BUFFERSIZE, 128);
curl_setopt($ch, CURLOPT_POSTFIELDS, $aPost);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$sResponse = curl_exec ($ch);
[/code]
В целевой системе файл кажется пустым.
Подробнее здесь: [url]https://stackoverflow.com/questions/25934128/curl-file-uploads-not-working-anymore-after-upgrade-from-php-5-5-to-5-6[/url]