开发者

Remote uploading images - file_get_contents(); to help me?

I'm wanting to create a website that allows an user to put a link in a field and once the user submits the form, the "image" link added to the field will be remote uploaded to my server (to the 开发者_JAVA百科path I specified in my server).

A friend of mine did this once, and he told me that he used the file_get_contents() function to get this working, but I cannot figure out how I'd do it.

Any help would be appreciated.

Thanks.


file_get_contents() will read file contents into a variable.
if you need to copy file to your server, use copy() instead.

copy($_POST['link'],basename($_POST['link']));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜