How does PHP convert remote FILES to $ _ FILES?

Source: Internet
Author: User
I have a remote file address: convert to $ _ FILES without submitting a form? I have a remote file address:

Localhost/1.zip

I have a function for uploading FILES. by default, FILES are uploaded using the POST method, and $ _ FILES must be input.

How can I change this 1.zip file to $ _ FILES without submitting a form?

Reply content:

I have a remote file address:

Localhost/1.zip

I have a function for uploading FILES. by default, FILES are uploaded using the POST method, and $ _ FILES must be input.

How can I change this 1.zip file to $ _ FILES without submitting a form?

@ Hoyt cannot be implemented. even if it is implemented, this is not a scientific solution. if you just want to upload a remote file to another site, simply use CURL.

When you encounter a problem and find that there is no solution, you should first think about whether the demand is too strange, or whether your design is flawed or unreasonable, for example, if you use the file upload function to remotely download files, you should not upload files but download files, and then store them in a unified manner,

The landlord can look at this idea of solving the problem x-y problem http://coolshell.cn/articles/10804.html

Can refer to this: http://blog.csdn.net/xuzuning/article/details/7444709

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.