开发者

not able to upload file on remote server

I am trying to upload image file from my one server to another remote server (owned by me). but its giving me error

Warning: move_uploaded_file(http://www.mysite.org/photo/color-sample-color开发者_StackOverflow社区ize12-10-2010-09-14-09.jpg) 
[function.move-uploaded-file]: failed to open stream: HTTP wrapper does not support writeable connections.

Thanks for any suggestion or help in advance


You cant do that.... You need the sites to be on the same physical server and have the directory youre moving to have the proper permissions and be mapped in to both sites.

You could however use ftp or cURL functions to actually upload the file to the remote server, just not move_uploaded_file.


You need to get the file from the remote server using something like file_get_contents and then save it to a file on the local server using file_put_contents, or ftp, or curl if you have the permissions. You can't just copy a file like you would if it was on the same server. (I assume this is what you're trying to do, right?)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜