您的位置:首页 > 编程语言 > Lua

openWRT学习之LUCI之二访问controller下lua文件的函数

2014-11-13 18:03 537 查看
备注:请关注之前的两篇文章在做下面的工作

entry({"admin", "system", "heyg3"}, call("heyg3"), _("heyg3"), 5).dependent=false



同时在system.lua文件中添加函数:

--adde by heyg :call

function heyg3()

luci.http.prepare_content("text/plain")

luci.http.write("haha rebootin now...")

luci.sys.reboot()

end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: