The Great Gods, PHP service number development, there is no good picture upload plugin recommended. I find a picture upload plugin, the end does not support.
Reply content:
The Great Gods, PHP service number development, there is no good picture upload plugin recommended. I find a picture upload plugin, the end does not support.
Direct use of HTML5 Fileread, can pass base64 data to the background, background to file save, plug-in words uploadify/uploadifive
The recommended image interface Uploadimage is then pulled to the local server
$url ='通过api获取到的图片地址'; $filename='图片名称.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,CURLOPT_FOLLOWLOCATION,1); //curl_setopt($hander,CURLOPT_RETURNTRANSFER,false);//以数据流的方式返回数据,当为false是直接显示出来 curl_setopt($hander,CURLOPT_TIMEOUT,60); curl_exec($hander); curl_close($hander); fclose($fp); Return true;
1. Upstairs said, with the provided image upload solution, the advantage is compatible with all mobile phones, the disadvantage is only save three days, not permanently saved, but also need to manually pull back.
2. Baidu Web Uploader, the compatibility of mobile phone upload is also good, Android 4.3+uc perfect use, but it is estimated that there will still be a part of the phone in the gun can not be used.
In fact, the relationship with PHP is not big, more is to see your front-end implementation. Think about base64?