mirror of
https://github.com/esp8266/Arduino.git
synced 2025-10-22 19:53:04 +03:00
added lua test cases
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@128 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
31
www/lua/test_main.lp
Normal file
31
www/lua/test_main.lp
Normal file
@@ -0,0 +1,31 @@
|
||||
<html>
|
||||
<head><title>Embeded Lua Test</title></head>
|
||||
|
||||
<body>
|
||||
cgi = {
|
||||
<?lua
|
||||
for i,v in pairs (cgi) do
|
||||
if type(v) == "table" then
|
||||
local vv = "{"
|
||||
for a,b in pairs(v) do
|
||||
vv = string.format ("%s%s = %s<br>\n", vv, a, tostring(b))
|
||||
end
|
||||
v = vv.."}"
|
||||
end
|
||||
?>
|
||||
<%= i %> = <%= tostring(v) %> <br>
|
||||
<%
|
||||
end
|
||||
%>
|
||||
}
|
||||
<br>
|
||||
Remote address: <%= cgilua.servervariable"REMOTE_ADDR" %>
|
||||
<br>
|
||||
Is persistent = <%= tostring (SAPI.Info.ispersistent) %>
|
||||
<br>
|
||||
ap = <?lua= tostring(ap) ?> <br>
|
||||
lfcgi = <% = tostring(lfcgi) %> <br>
|
||||
<%= (ap and ap.handler()) or "" %> <br>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user