使麻煩使用我試圖將圖像上傳到S3存儲桶。不幸的是,我收到了一個奇怪的錯誤,無法在Google上找到任何東西。cURL與亞馬遜SDK使用create_object
$s3 = new AmazonS3();
$bucket = 'myBucket';
$fileResource = 'test.JPG';
$response = $s3->create_object($bucket, $filename, array('fileUpload' => $fileResource));
print_r($response);
當執行腳本中,我得到以下信息:
Fatal error: Uncaught exception 'RequestCore_Exception' with message 'cURL resource: Resource id #20; cURL error: select/poll returned error (55)' in /home/myproject.com/public_html/aws/lib/requestcore/requestcore.class.php:817 Stack trace: #0 /home/myproject.com/public_html/aws/services/s3.class.php(688): RequestCore->send_request() #1 /home/myproject.com/public_html/aws/services/s3.class.php(1286): AmazonS3->authenticate('myBucket', Array) #2 /home/myproject.com/public_html/myScript.php(16): AmazonS3->create_object('myBucket', NULL, Array) #3 {main} thrown in /home/myproject.com/public_html/aws/lib/requestcore/requestcore.class.php on line 817
任何想法? cURL在其他文件中工作正常。
'55 =無法發送網絡data.'。你確定curl指向的url是有效的嗎? – Wrikken