|
--获取一键玩网络文件base64
local base64 = httpPost("http://pc.yijianwan.com:8080/yjw_pc_login/api/webFile64/getFile?作者=100003&用户标识=zuozhe&文件名=123.txt")
if string.find(base64, "错误") then
print("获取失败:"..base64)
else
--将网络文件写入本地
local ret,res = writeFileBase64("/sdcard/111.txt", base64)
if ret then
--写入成功
print("写入成功")
else
--写入失败
print("错误原因:"..res)
end
end
|