openresty(nginx+lua)中获取不到post数据,ngx.req.get_body_data返回nil This function returns nil if the request body has not been read, the request body has been read into disk temporary files, or the request body has zero size. 打开nginx调试日志 error_log /var/log/ng
因为经常用到的功能,所以我想到封装一个函数,用起来更方便快捷.. 先来看效果图如下: var data = {a:'aaaa', b:'2', 'c':[1,2,4]} 这就相当于 ajax 返回的json, 元素是通过 name 来查找的, 其基本形式: name : value checkbox 比较特殊,它是多个并存,所以要 "选中" 它得通过值来查找, 值对上了,就把它"选中" 当然, 还有清除数据的情况: var data = {a:'', b:'', '