本文实例为大家分享了php微信上传临时素材的具体代码,供大家参考,具体内容如下 public function uploadImg($imgUrl){ $TOKEN=$this->getAccessToken(); $URL ='http://file.api.weixin.qq.com/cgi-bin/media/upload?access_token='.$TOKEN.'&type=image'; $data = array('media'=>'@'.$imgUrl); $result = $this->curl_post($URL,$data); $data =