Question about uploading and transferring images in javascript-php WeChat development?

Source: Internet
Author: User
Are there any good Image Upload plug-ins recommended for php service code development. Find an Image Upload plug-in by yourself, which is not supported by the client. Are there any good Image Upload plug-ins recommended for php service code development. Find an Image Upload plug-in by yourself, which is not supported by the client.

Reply content:

Are there any good Image Upload plug-ins recommended for php service code development. Find an Image Upload plug-in by yourself, which is not supported by the client.

You can directly use the fileRead of html5 to transmit base64 data to the background, and convert the background to file storage. If the plug-in is used, Uploadify/uploadifive

The recommended image interface uploadImage is then pulled to the local server.

$ Url = 'image address obtained through the api '; your filename''image name .jpg'; $ hander = curl_init (); $ fp = fopen ($ filename, 'wb '); curl_setopt ($ hander, CURLOPT_URL, $ url); curl_setopt ($ hander, CURLOPT_FILE, $ fp); curl_setopt ($ hander, CURLOPT_HEADER, 0); curl_setopt ($ hander, handler, expires, 1); // curl_setopt ($ hander, CURLOPT_RETURNTRANSFER, false); // return data as a data stream. If it is false, curl_setopt ($ hander, CURLOPT_TIMEOUT, 60); curl_exec ($ hander); curl_close ($ hander); fclose ($ fp); Return true;

1. As mentioned above, the Image Upload solution provided by Alibaba Cloud is compatible with all mobile phones. The disadvantage is that it is only saved for three days, not permanently saved. You need to manually pull it back.
2. Baidu's web uploader has good compatibility with Mobile upload. android 4.3 + UC is perfect for use, but it is estimated that some mobile phones won't be used.

In fact, it has little to do with php, but more depends on your front-end implementation. Consider base64?

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.