Nginx: Difference between revisions

From WikiWiki
Jump to navigation Jump to search
(Created page with "Some [https://www.nginx.com/ nginx] notes <syntaxhighlight lang="Lua"> local folder = ngx.var.arg_folder or "/tmp" local command = "ls ".. folder local handle = io.popen(...")   (change visibility)
 
No edit summary   (change visibility)
Line 4: Line 4:




<syntaxhighlight lang="Lua">
<syntaxhighlight lang="bash">
local folder = ngx.var.arg_folder or "/tmp"
local folder = ngx.var.arg_folder or "/tmp"



Revision as of 15:57, 15 April 2021

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 )