下载FTP站点文件au3源码
#include #include ;---------------------读取FTP设置信息------------------------ Global Const $config = @ScriptDir & "\FTPCONFIG.INI" If FileExists($config) Then Global $server = IniRead($config, "set", "server", "") Global $username = IniRead($config, "set", "username", "") Global $pass = IniRead($config, "set", "password", "") Global $i_SrvPort = IniRead($config, "set", "srvp ort", "") Else MsgBox(16, "Error!", "配置文件丢失,请检查!") Exit EndIf ;-------------------- FTP设置信息读取完毕!------------------- $Open = _FTP_Open('yxgftp') $Conn = _FTP_Connect($Open, $server, $username, $pass, "", $i_SrvPort) ;下载文件 $s_LocalFile="F:\FTP\123.exe" $s_RemoteFile="/software/DG2013_Final_1031E.exe" _FTP_FileGet($Conn, $s_RemoteFile, $s_LocalFile, True) $Ftpc = _FTP_Close($Open) ort", "") Else MsgBox(16, "Error!", "配置文件丢失,请检查!") Exit EndIf ;-------------------- FTP设置信息读取完毕!------------------- $Open = _FTP_Open('yxgftp') $Conn = _FTP_Connect($Open, $server, $username, $pass, "", $i_SrvPort) ;下载文件 $s_LocalFile="F:\FTP\123.exe" $s_RemoteFile="/software/DG2013_Final_1031E.exe" _FTP_FileGet($Conn, $s_RemoteFile, $s_LocalFile, True) $Ftpc = _FTP_Close($Open)
用户评论