且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

当我从Vb下载文件它被损坏

更新时间:2023-11-25 15:02:58

第一个参数应该是url,第二个参数是实际文件名。您也可以在URL中输入文件名。请查看此处的示例:

http:/ /msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx [ ^ ]



祝你好运!

the weird thing is, it worked before? this is my code

Dim wc As WebClient = New WebClient()
       wc.DownloadFile("myfilehost\mods.zip", "mods.zip")



i download it from 4share

First parameter should be the url and the second parameter the actual filename. You give the filename also in the URL. Check the example here:
http://msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx[^]

Good luck!