Explorar o código

Check relation between a lua script, a CGI script and a lp file

bel %!s(int64=11) %!d(string=hai) anos
pai
achega
b7364c1f1f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      test/ajax/echo.lsp

+ 6 - 0
test/ajax/echo.lsp

@@ -0,0 +1,6 @@
+function print(txt) mg.write(txt .. "\r\n") end
+mg.write("HTTP/1.1 200 OK\r\n")
+n = string.match(mg.request_info.uri, "^(.*)%.lp$")
+n = string.gsub(n, [[/]], [[\]])
+n = mg.document_root .. n .. ".cgi"
+dofile(n)