#include <lwip/httpd/httpd.h>
Public Attributes | |
tfHttpdCgiFunc | func |
const char * | name |
This structure specifies the application specific CGI functions. The table will be filled in by the application and passed to tcHttpd::run() in the tsHttpdParams::cgi_table field. The table must contain one entry pair for each CGI function which the application provides.
The following example shows two CGI functions. The first function "Hello" will be invoked when the webserver loads a page which contains the tag string <%Hello%>. The second function "World" will be invoked when the webserver loads a page which contains the tag string <%World%>.
tsHttpdCgiTable cgi_function_table[] = { cgi_hello, "Hello", // <%Hello%> tag cgi_world, "World", // <%World%> tag NULL, NULL // End of table marker }; void cgi_hello (tsHttpConn *httpconn) { const char str = "<B>Hello</B>"; httpconn->httpd->html_write (httpconn, str, strlen (str)); } void cgi_world (tsHttpConn *httpconn) { const char str = "<B>World!!!</B>"; httpconn->httpd->html_write (httpconn, str, strlen (str)); }
Pointer to an application provided CGI function.
const char* tsHttpdCgiTable::name |
The name of the CGI function as specified in the HTML code which references the function.