标签:服务器 random dom 控制 eve str time() int 素数
#按毫秒级取值math.randomseed(tostring(os.time()):reverse():sub(1, 7))action2={13,24}if (#action2) > 1 thenaction2=action2[math.random(#action2)]print (action2)endnginx-lua取后端redis key为数组时的随机取值.
标签:服务器 random dom 控制 eve str time() int 素数
原文地址:https://blog.51cto.com/13801798/2462768