Skip to content
it4e edited this page Oct 4, 2016 · 2 revisions

Name

<chl/chl.h>

chl_view, CHL view

Declaration

void chl_view(char * path);

Description

The chl_view function is used to fetch the contens of a view file [path], as well as output the standard HTTP headers.

Arguments

  • path: the path to the view file

Return value

No return value.


Examples

main.c

#include <chl/chl.h>
#include <stdio.h>

int main() {
    // Import view file and output standard headers
    chl_view("index.vw");
}

index.vw (view file)

....
<body>
Hello world!
</body>
....

Output: .... <body> Hello world! </body> ....

As CHL is open-source, people are able to contribute with their own APIs, plugins and code which means that CHL is constantly upgraded and provided with new features. Do you have an idea for a new CHL feature and want to contribute?

See contribute.

Setup. API. Tutorial. Examples. FastCGI.

Clone this wiki locally