ftp1.Host=GetConfigValue("IP" & i,"")
ftp1.Account = GetConfigValue("用户名" & i,"")
ftp1.Password = GetConfigValue("密码" & i,"")
ftp1.RootDir = GetConfigValue("根目录" & i,"")
ftp1.UTF8 = True
If ftp1.DirExists(GetConfigValue("当前目录" & i,"")) Or ftp1.MakeDir(GetConfigValue("当前目录" & i,"")) Then
Else
MessageBox.show("FTP服务器不存在当前文件夹,并且无法创建!")
Return
End If
ftp1.ChangeDir(GetConfigValue("当前目录" & i,""))
If Functions.Execute("连接测试",ftp1.host) Then
If ftp1.Connected Or (ftp1.Connected=False AndAlso ftp1.Connect) Then
end if
end if
以上代码在运行中,不知道运行到 那个 代码,就 已经 连接到 FTP 服务器了