摘要: -- 获取请求路径 local request_uri = ngx.var.request_uri -- 从 header中取值 local token = ngx.req.get_headers()["token"] -- 获取cookie中的值 local user_id = ngx.var.c 阅读全文
posted @ 2022-06-30 22:33 醒日是归时 阅读(1478) 评论(0) 推荐(0) 编辑
摘要: 1. 利用string库的gsub函数 function split( str,reps ) local resultStrList = {} string.gsub(str,'[^'..reps..']+',function ( w ) table.insert(resultStrList,w) 阅读全文
posted @ 2022-06-30 18:32 醒日是归时 阅读(964) 评论(0) 推荐(0) 编辑