Annotation of embedaddon/axTLS/www/lua/test_main.lp, revision 1.1
1.1 ! misho 1: <html>
! 2: <head><title>Embeded Lua Test</title></head>
! 3:
! 4: <body>
! 5: cgi = {
! 6: <?lua
! 7: for i,v in pairs (cgi) do
! 8: if type(v) == "table" then
! 9: local vv = "{"
! 10: for a,b in pairs(v) do
! 11: vv = string.format ("%s%s = %s<br>\n", vv, a, tostring(b))
! 12: end
! 13: v = vv.."}"
! 14: end
! 15: ?>
! 16: <%= i %> = <%= tostring(v) %> <br>
! 17: <%
! 18: end
! 19: %>
! 20: }
! 21: <br>
! 22: Remote address: <%= cgilua.servervariable"REMOTE_ADDR" %>
! 23: <br>
! 24: Is persistent = <%= tostring (SAPI.Info.ispersistent) %>
! 25: <br>
! 26: ap = <?lua= tostring(ap) ?> <br>
! 27: lfcgi = <% = tostring(lfcgi) %> <br>
! 28: <%= (ap and ap.handler()) or "" %> <br>
! 29:
! 30: </body>
! 31: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>