VB.NET 文件上传FTP服务器方法
Private Function 上传文件(FTP路径 As String, 文件 As Byte(), FTP用户名 As String, FTP密码 As String) As String
Try
Dim Wc As New Net.WebClient
Wc.Credentials = New Net.NetworkCredential(FTP用户名, FTP密码)
Dim Bts() As Byte = Wc.UploadData(FTP路径, 文件)
Return ""
Catch ex As Exception
Return ex.Message
End Try
End Function