luapage


A Lua Page is a text template file which will be processed by FCGILua before the HTTP server sends it to the client

A Lua Page is a text template file which will be processed by FCGILua before the HTTP server sends it to the client. FCGILua does not process the text itself but look for some special markups that include Lua code into the file. After all those markups are processed and merged with the template file, the results are sent to the client.

Lua Pages have a default .lp extension. They are a simpler way to make a dynamic page because there is no need to send the HTTP headers. Usually Lua Pages are HTML pages so FCGILua sends the HTML header automatically.

Since there are some restrictions on the uses of HTTP headers sometimes a Lua Script will have to be used instead of a Lua Page.

The fundamental Lua Page markups are:

Processes and merges the Lua chunk execution results where the markup is located in the template. The alternative form <% chunk %> can also be used. Processes and merges the Lua expression evaluation where the markup is located in the template. The alternative form <%= expression %> can also be used. Note that the ending mark could not appear inside a Lua chunk or Lua expression even inside quotes. The Lua Pages pre-processor just makes global substitutions on the template, searching for a matching pair of markups and generating the corresponding Lua code to achieve the same result as the equivalent Lua Script.

Project Information

Labels:
lua page web fastcgi weblua luaweb luapage fcgi