总提示上传文件意外错误,怎么办?
Dim dlg As New openFileDialog '定义一个新的SaveFileDialog
dlg.MultiSelect = True
If dlg.showDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim ftp1 As new ftpclient
ftp1.host="218.203.157.199"
ftp1.Port = 2121
ftp1.Account = "js"
ftp1.password = "***"
For Each f As String In dlg.FileNames
If ftp1.Upload(f,"/lswj/zjc/" & filesys.GetName(f) , True) = True Then
Messagebox.show(dlg.FileName & "上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show(dlg.FileName & "上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Next
ftp1.Close
End If