无法打开流:HTTP 包装器在 Amazon EC2 上上传时不支持可写连接


failed to open stream: HTTP wrapper does not support writeable connections while upload on amazon EC2

我正在使用 Amazon EC2 服务器进行托管。

遇到了一个问题:-我必须将一个文件从我的服务器复制到亚马逊存储桶

为此,我正在使用

$str = file_get_contents('http://www.custmore.com/dev/usercontent/userphoto/user_photo_1358927451.jpg');

file_put_contents"(http://s3.amazonaws.com/custmorebuck/test", $str);

但是得到错误

无法打开流:HTTP 包装器不支持可写连接

任何人都可以建议解决此问题吗

你必须使用流包装器。

https://forums.aws.amazon.com/thread.jspa?messageID=283440

希望上面的链接有所帮助。