标签:class blog code http tar com
nixio.syslog("string") 函数用来debug luci WEB界面编程, 通过logread命令来读取打印的debug信息(据说是Linux系统的syslog标准POSIX函数)
http://luci.subsignal.org/api/nixio/modules/nixio.html
entry函数, 这个函数主要用来存储索引的,例如下面的:
function index() 19 entry({"admin", "system"}, alias("admin", "system", "system"), _("System"), 30).index = true 20 entry({"admin", "system", "system"}, cbi("admin_system/system"), _("System"), 1) 21 entry({"admin", "system", "clock_status"}, call("action_clock_status")) 22 23 entry({"admin", "system", "admin"}, cbi("admin_system/admin"), _("Administration"), 2) 24 25 if nixio.fs.access("/bin/opkg") then 26 entry({"admin", "system", "packages"}, call("action_packages"), _("Software"), 10) 27 entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg")) 28 end 29 30 entry({"admin", "system", "startup"}, form("admin_system/startup"), _("Startup"), 45) 31 entry({"admin", "system", "crontab"}, form("admin_system/crontab"), _("Scheduled Tasks"), 46) 32 33 if nixio.fs.access("/etc/config/fstab") then 34 entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), _("Mount Points"), 50) 35 entry({"admin", "system", "fstab", "mount"}, cbi("admin_system/fstab/mount"), nil).leaf = true 36 entry({"admin", "system", "fstab", "swap"}, cbi("admin_system/fstab/swap"), nil).leaf = true 37 end 38 39 if nixio.fs.access("/sys/class/leds") then 40 entry({"admin", "system", "leds"}, cbi("admin_system/leds"), _("<abbr title=\"Light Emitting Diode\">LED</abbr> Configuration"), 60) 41 end 42 43 entry({"admin", "system", "flashops"}, call("action_flashops"), _("Backup / Flash Firmware"), 70) 44 entry({"admin", "system", "flashops", "backupfiles"}, form("admin_system/backupfiles")) 45 46 entry({"admin", "system", "reboot"}, call("action_reboot"), _("Reboot"), 90) 47 end
lua step by step 学习网站不错
http://www.cnblogs.com/stephen-liu74/archive/2012/07/30/2487201.html
luci 函数nixio, entry,布布扣,bubuko.com
标签:class blog code http tar com
原文地址:http://blog.csdn.net/qianguozheng/article/details/29645927