摘要
目前商用Wi Fi路由器已应用到多个领域,商家通过给用户提供一个稳定免费Wi Fi热点达到吸引客户、提升服务的目标。传统路由器自带的Luci界面提供了工厂模式的Web界面,用户可通过该界面配置路由器。Luci采用MVC模式(Model-View-Controller)构造网页,能实现动态的程序设计,便于修改和扩展。本文主要针对Open Wrt系统的路由器,介绍如何使用Lua和Java Script脚本语言添加用户模式Web界面。此外,还介绍了工厂模式和用户模式之间的切换、添加Web页面的方法,给出了一些应用实例。
Commercial WiFi routers have been implemented into many areas now. By providing customers with a stable free WiFi, vendors attempt to attract more customers and improve their service quality. Traditional ruuters provide factory mode Web interface by Luci. Users can configure touters via the supplied interface. Luci chooses the MVC pattern (Model-View-Controller) to construct web-pages, can achieve the goal of designing programs online, modifying or expanding programs very conveniently. This paper mainly focuses on the OpenWrt-based routers, introduces how to add user-mode and Web interface by using JavaScript and Lua scripting language. Moreover, the switch between the factory mode and user mode and adding Web pages are also introduced in this paper. Some examples are given.
出处
《微型机与应用》
2015年第23期91-94,共4页
Microcomputer & Its Applications
基金
国家自然科学基金(61273112)