Answer the question
In order to leave comments, you need to log in
What is the logic behind the luci interface?
In the OpenWrt firmware in the www folder:
index.html - a file with a redirect to the
cgi-bin
script luci a certain script with loading something and running
luci-static - css resources and pictures for the interface
File luci
#!/usr/bin/lua
require "luci.cacheloader"
require "luci.sgi.cgi"
luci.dispatcher.indexcache = "/tmp/luci-indexcache"
luci.sgi.cgi.run()
Answer the question
In order to leave comments, you need to log in
The file in the www1/cgi-bin/ directory has been
slightly cleared up a lua script, or a link to lua files
#!/usr/bin/lua --указываем интерпретатор
require("ns.start") --вызываем lua скрипт по пути /usr/lib/lua/ns/start.lua
local function main()
print ("Content-type: Text/html\n")
print("")
print("<!DOCTYPE html>")
print("Hello World!!!")
end
main()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question