lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

I use NearlyFreeSpeach from time to time, and it has Lua as standard.

This little test script dumps the various CGI env vars (try for
example ):

$ cat luatest.cgi
io.stdout:write("Content-Type: text/plain\r\n\r\n")
io.stdout:write("Hello, world! (Lua)\r\n")
for k, v in pairs(arg) do
        io.stdout:write(tostring(k), ": ", tostring(v), "\r\n")
io.stdout:write("PATH=" .. os.getenv("PATH") .. "\r\n")
for _, e in ipairs(vars) do
        io.stdout:write(e .. "=" .. os.getenv(e).. "\r\n")