戎码一生
- 戎码一生 回答了问题 求推荐一个好用的基于YII的后台管理系统
yii 高级版自带后台管理系统,不可以吗?
- 戎码一生 回答了问题 已知图片base64流如何上传到其他服务器
function imgUpload($url,$imgName,$path='./'){
$data = array( 'file'=>new \CURLFile(realpath($path.'/'.$imgName)), ); $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_TIMEOUT,60); $output = curl_exec($ch); curl_close($ch); unlink($path.'/'.$imgName); return $output; }
这个方法你试试