Nginx

From WikiWiki
Jump to navigation Jump to search

Some nginx notes



local folder = ngx.var.arg_folder or "/tmp"

local command = "ls ".. folder
local handle = io.popen(command)
local result = handle:read("*a")
handle:close()
ngx.say(result )