if xianlu == "线路1" then
URL = "ftp.hengit.ga/"
VersionInfo = httpGet("ftp://:@ftp.hengit.ga/htdocs/A.txt" )
end
if versionfo ~= "" then
newVersion = string.match(VersionInfo, "version=([%d.]+)")
if CURRENT_VERSION < tonumber(newVersion) then
update()
else
end
if xianlu == "线路1" then
FTPAddr = "ftp://ftp.hengit.ga/htdocs/"
FTPUser = "**"
FTPPsw = "**"
newfileName = string.match(VersionInfo, "fileName=(%S+)")
newFile = ftpGet(FTPAddr..newfileName, "/var/touchelf/scripts/"..newfileName, FTPUser, FTPPsw)
os.exit();
end
ftp网址能够正常放,传输也正常。不知道哪里出了问题,恳请帮忙解决。
flag = ftpGet("ftp://ftp.hengit.ga/htdocs/AABB.lua", "/var/touchelf/scripts/AABB.lua", "", "") -- 将FTP服务器192.168.1.100上路径为/a.txt的文件下载到/var/touchelf/a.txt
if flag then
notifyMessage("下载成功")
else
notifyMessage("下载失败")
end
if versionfo ~= "" then
newVersion = string.match(VersionInfo, "version=([%d.]+)")
if CURRENT_VERSION < tonumber(newVersion) then
我是源码复制过来~一直用这个。再说怎么打印~日志也输出不了呢。用手册FTP能够访问下载,我想不应该是FTP地址的问题吧?
看下newVersion的值对不对