The cgiWrtFileIFS procedure copies the text (typically HTML) in the CGI output buffer to a file on the IFS.
The cgiWrtFileIFS procedure writes the output buffer to an IFS file. It does not clear the CGI buffer. The buffer may still be sent to the browser using the cgiFlushBuffer() procedure or it may be abandoned. Typically this procedure is used to review (i.e., debug) your HTML without sending it to the browser.
nBytesWritten cgiWrtFileIFS( szIFSFile * VALUE OPTIONS(*STRING) bRedirect N Const OPTIONS(*NOPASS) ) |
|
See also: cgiWrtSection |
The Location: response-header is used to redirect the client's browser to a location other than the Request-URI for completion of the request or identification of a new resource.
The valid choices for this parameter are as follows:
| Options | Description |
|---|---|
| '0' | Do not send the Location: header to the browser |
| '1' | Send the Location: header tot he browser. |
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 cgiWrtFileIFS('/www/htdocs/debug.html')