62,041
社区成员
发帖
与我相关
我的任务
分享
WebClient wc = new WebClient();
string targetPath = "http://XX.XX.XX.XX/fund/checkstate.txt";//这个地址是直接可以在浏览器里面访问的
string sourcePath = @"E:\checkstate.txt";
FileStream fs = new FileStream(sourcePath, FileMode.Open, FileAccess.Read);
byte[] bt = new byte[fs.Length];
fs.Read(bt, 0, bt.Length);
wc.UploadData(targetPath, "PUT", bt);