使用VBScript写一个上传FTP的Function,首先注册ASPFTP.DLL,代码部分如下:
Function UpLoadFTP()
Dim ServerName, User, Pwd, RemoteFile, Localfile, TransType,objFTP,abcResult
Set objFTP = CreateObject("NIBLACKLI.ASPFTP")
ServerName="XXXXX"
User="XXXX"
Pwd="XXXXX"
TransType=0
RemoteFile="xxxx"
Localfile="xxxx"
'RemoteFile注意:假如LocalFile="d:/aaa.txt",FTP上的路径为test,则Remotefile="text/aaa.txt"
abcResult= objFTP.bQPutFile(ServerName, User, Pwd, Localfile, RemoteFile, TransType)
set objFTP=Nothing
end function