root@arduino:/# cd /osjs/dist/cgi-bin
root@arduino:/osjs/dist/cig-bin# vi helloCGI
#!/usr/bin/lua
-- HTTP header
print("Content-Type: text/html")
print("") -- An empty line
-- body
print("<h1>Hello CGI</h1>")
print("<h2>Current time: " .. os.date("%D %T") .. "</h2>")
root@arduino:/osjs/dist/cig-bin# chmod +x helloCGI
http://arduino.local/cgi-bin/helloCGI
沒有留言:
張貼留言