我用控件Inet上传一个文件到服务器:
假设userName是abc,Password是123456Inet1.URL= "abc:[email protected]"
Inet1.RemotePort = 21
Inet1.Protocol = icFTP
Inet1.Execute , "PUT " & "d:\aaa.txt aaa.txt" Do While Inet1.StillExecuting
DoEvents
Loop
MsgBox "上传完毕!", vbInformation, "提示"每次运行,提示上传结束,可是用上传工具在服务器上却看不到所传的aaa.txt
我是在VIP.51.net申请的空间,如果上面的代码不正确,应该如何操作。
请高手指教。
Inet1.Execute , "PUT " & "d:\aaa.txt aaa.txt"
整个过程是这样的:Inet1.URL = "abc:[email protected]"
Inet1.RemotePort = 21
Inet1.Protocol = icFTPInet1.Execute , "CD " & "D:\servePath"
Inet1.Execute , "PUT " & "d:\aaa.txt aaa.txt" Do While Inet1.StillExecuting
DoEvents
Loop
MsgBox "上传完毕!", vbInformation, "提示"还需要改正么?
Inet1.Execute , "CD " & "D:\servePath"
这只是一个例句,你得填写上服务器给你存放文件的真正目录名。