Topic complex |
CGI functions |
Function |
cgiclearbuffer() |
Short |
Deletes the content of the output buffer |
Syntax |
CGICLEARBUFFER |
Parameter |
|
Return |
0 |
See also: |
|
Description |
Deletes the content of the buffer without putting it out. The buffering is not terminated, i.e. all following outputs are buffered again.
This function can be used, if e.g. an error occurs to output an error message instead of the so far outputs. Also another header can be put out.
|
Example 1: CGIClearBuffer
Decides to re-locate even after the HTTP-header has been written already.
CGIWriteLn('content-type: text/html');
CGIWriteLn('');
LoadTemplate(my_template);
IF GetQueryString('command')='start_admin' THEN
CGIClearBuffer;
CGIWriteLn('location: /cgi-tdb/login.prg')
CGIWriteLn('')
END
|
Write a comment:
|