KLone
3.1.0
Below is a quick reference list of essential variables and functions used by all KLone applications.
A more complete list is available following the above tabs.
Any KLone dynamic page (*.kl1) can access the following predefined objects:
-
request_t *request;
- Used to access all information related to the current HTTP request such
as form variables, cookies, HTTP header fields, uploaded files, etc.
-
response_t *response;
- This object lets you access and modify the HTTP response entities such as
header fields and status codes.
-
session_t *session;
- Sessions are objects which can be used to preserve client related
information throughout subsequent accesses.
Simple functions are provided to set/get {name, value} pairs.
-
io_t *out;
- The output object is used to print out dynamically generated content.
-
- Return the value of a form variable.
-
- Return the value of an header field.
-
- Redirect to the specified URL.
-
const char *session_get(session_t *ss, const char *name)
- Get the value of a session variable.
-
int session_set(session_t *ss, const char *name, const char *value)
- Set the value of a session variable.