doubleval, echo, exit, file_get_contents, floatval, $_GET,
hash, hash_password, header, hexdec, htmlentities,
gmp_and, gmp_or, gmp_xor, intval, is_int, is_null, is_numeric,
json_encode, longval, ltrim, random_bytes, random_int,
rawurlencode, require, rtrim, sha256_append, shm_attach,
shm_detach, shm_get_var, shm_has_var, shm_put_var, shm_remove_var,
sleep, strlen, strpos, substr, sqrt, str_rot13, strval, trim,
urldecode, usleep, verify_password
$_SERVER
Every web page is compiled into a class. The name of the web page is the name of the class. Subdirectory slashes are converted into underscores.
Each web page class supports the following properties and methods:
| private void *Context | Used to store the http_request pointer for use with methods defined in PageInfoFromWebServer.h. These are callback methods used for interfacing with NGINX. Context is needed to output text back to the web page using dll_response_write, for instance. |
| Create(void *context) | Static method to create an instance of this web page class.
If context is nullptr then the class is created on the heap. Otherwise, the class is created in the temporary heap inside NGINX using dll_malloc_temp.
Also, this method calls the __construct() method of the class if it's defined. |
| Dispose() | Deletes this class. If Context is nullptr, then delete is used. Otherwise, dll_free_temp is called. |
| __construct() | A method that you can define in your class to be called when an instance of the class is created.
This is similar to the way PHP does it. |
| __destruct() | A method that you can define in your class to be called when an instance of the class is destroyed.
This is similar to the way PHP does it. |
| There are two constructors. One that takes zero arguments and one that takes a void *context argument. | |
| SetContext(void *context) | Sets the context variable. This is needed because Context is private to allow multiple inheritance. |
| Render() | Renders the page. All the text and chp command that are before the first public: or protected: or private: designation are inside the render method.
Variables defined above this are local to the Render method.
Variables and methods after the public: or protected: or private: are class level variables and methods. |
| FillWebPageStruct(_web_page *web_page) | Called internally to fill a struct to define how to call the Create, Render, Dispose methods of this class. _web_page contains 5 pointers to functions. |
| require("/MyHeaderPage.chp"); | Loads the webpage for MyHeaderPage.chp and calls its render method. |