FTP是用群辉自带的FTP软件来设置的,以下代码在测试是否链接上FTP的时候,显示是OK的,但却显示上传失败,请问是什么问题?
Dim ftp1 As New FtpClient
ftp1.Host="120.2**.1**.1**"
ftp1.Account = "na*****"
ftp1.Password = "1QAZ2*****"
ftp1.port = 9721
If ftp1.Connected = False '如果FTP没有连接
If ftp1.Connect Then '连接FTP
Messagebox.show("OK!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
If ftp1.Upload("d:\123.jpg","\BINFTP\456.jpg") = True Then
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
Else
Messagebox.show("连接FTP失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If
End If