我的脚本代码是这样的local args = ngx.req.get_uri_args()for k,v in pairs(args) do ngx.say(k..":"..v)end然后我使用curl http://localhost/cats?param=test&&id=1输出结果是param:test另外的参数和对应的值没有输出。这个是因为什么呢 --
我的脚本代码是这样的local args = ngx.req.get_uri_args()for k,v in pairs(args) do ngx.say(k..":"..v)end然后我使用curl http://localhost/cats?param=test&&id=1
输出结果是param:test另外的参数和对应的值没有输出。这个是因为什么呢 --
2015-05-29 19:05 GMT+08:00 <pengz...@gmail.com>:我的脚本代码是这样的local args = ngx.req.get_uri_args()for k,v in pairs(args) do ngx.say(k..":"..v)end然后我使用curl http://localhost/cats?param=test&&id=1你在命令行执行的?bash 会把 & 解释为放后台执行的,你得给你的 url 加上 ''curl 'http://localhost/cats?param=test&id=1' 输出结果是param:test另外的参数和对应的值没有输出。这个是因为什么呢 --