secretKey ="b***************9"; $r">
时间:2021-07-01 10:21:17 帮助过:34人阅读
$c = new TopClient;
$c->appkey = "1*****2";
$c->secretKey ="b***************9";
$req = new PictureUploadRequest;
$req->setPictureCategoryId("0");
$content = file_get_contents("http://img20.360buyimg.com/vc/jfs/t1936/10/62548506/219327/ba45f44c/55ebc1baNdb5f788d.jpg");
//=========这里的setImg应该怎么传网络上的图片呢?====
$req->setImg($content);
$req->setImageInputTitle("Bule.jpg");
$req->setTitle("图片名称");
$req->setClientType("client:computer");
$resp = $c->execute($req,"********************");
var_dump($resp);
新手问题,要把网络图片上传到图片空间,php的代码应该怎么编写?