111,125
社区成员
发帖
与我相关
我的任务
分享
。

//下载头像到本地
WebClient web = new WebClient();
string loclurl = "~/wechat/HeadImage/";// +new Guid("d").ToString();
string path = Server.MapPath(loclurl);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
string guid = Guid.NewGuid().ToString("d");
path += guid + ".jpg";
web.DownloadFile(oa1.headimgurl, path);
//下载头像到本地
WebClient web = new WebClient();
string loclurl = "~/wechat/HeadImage/";// +new Guid("d").ToString();
string path = Server.MapPath(loclurl);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
web.DownloadFile(headimgurl, path);