> 您好!
> 我想請問下nginx模塊里面怎么獲取post參數,能有具體的代碼更好!謝謝
>
對於 "application/x-www-form-urlencoded" 格式的 POST 參數獲取,可以參考 ngx_lua 模塊的
ngx.req.get_post_args() 函數以及 ngx_form_input 模塊的實現:
http://wiki.nginx.org/HttpLuaModule#ngx.req.get_post_args
https://github.com/calio/form-input-nginx-module
而對於 "multipart/form-data" 格式的 POST 參數獲取,可以參考 ngx_upload 模塊以及 lua-resty-upload 庫:
http://www.grid.net.ru/nginx/upload.en.html
https://github.com/agentzh/lua-resty-upload
Best regards,
-agentzh