The cgiWrtSection procedure merges an substitution variables with the text (typically HTML) in the specified section and writes the merged results to the CGI output buffer.
The cgiWrtSection procedure writes the text of the specified section name to an internal CGI buffer. This buffer is a staging area used to accumulate the results of several calls to the cgiWrtSection procedure until a cgiFlushBuffer() is called. The cgiFlushBuffer procedures sends the CGI buffer to the web browser via a write to the stdout (standard output) device via a call to QtmhWrStout.
nBytesWritten cgiWrtSection( szSection 64A Const ) |
|
See also: cgiFlushBuffer |
| Special Section Names | Description |
|---|---|
| *TOP | Write out the HTML up to the first user-specified section name. Synonyms for *TOP include: *START, *BEGIN, *NONAME and NONAME. |
| *FLUSH | Write out any HTML that has be previous sent to the output buffer via a previous cgiWrtSection() call, to the browser. Synonyms for *FLUSH include: *FIN, *FINI, *BOTTOM, *END, *FINISH. You may alternatively call the cgiFlushBuffer() procedure. |
The return value is the number of bytes written to the IFS file.
The following sends the HTML in the CGILIB's internal buffer to the file named DEBUG.HTML in the /www/htdocs folder on the IFS.
/INCLUDE XTOOLS/QCPYSRC,cgi
.....CSRn01..............OpCode(ex)Extended-factor2++++++++++++++++++++++++++++++++
C Eval cgiWrtSection('/www/htdocs/debug.html')