<html><head><title>WriteCGIHeader</title></head><body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000"><font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">WriteCGIHeader()</font></b></p><p><b>Syntax</b></p><blockquote>Result = <font color="#3A3966"><b>WriteCGIHeader</b></font>(Header,ドル Value$ [, Flags])</blockquote></blockquote><b>Description</b><br><blockquote>Writes a header to the CGI output. The headers needs to be written beforeany other data.</blockquote><p><b>Parameters</b></p><blockquote><style type="text/css">table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }</style><table width="90%" class="parameters"><tr><td width="10%"><i>Header$</i></td><td width="90%">The header to write. It can be a custom or one of the following value:<pre><font face="Courier New, Courier, mono"size="2"> <font color="#924B72">#PB_CGI_HeaderContentLength</font> : the length (in bytes) of the output stream (implies binary data).<font color="#924B72">#PB_CGI_HeaderContentType</font> : the MIME content type of the output stream.<font color="#924B72">#PB_CGI_HeaderExpires</font> : date and time when the document is no longer validand should be reloaded by the browser.<font color="#924B72">#PB_CGI_HeaderLocation</font> : server redirection (cannot be sent as part of a complete header).<font color="#924B72">#PB_CGI_HeaderPragma</font> : turns document caching on and off.<font color="#924B72">#PB_CGI_HeaderStatus</font> : status of the request (cannot be sent as part of a complete header).<font color="#924B72">#PB_CGI_HeaderContentDisposition</font> : allows to specify a default filename when sending out a file.<font color="#924B72">#PB_CGI_HeaderRefresh</font> : client reloads specified document.<font color="#924B72">#PB_CGI_HeaderSetCookie</font> : client stores specified data,useful for keeping track of data between requests.</font></pre></td></tr><tr><td><i>Value$</i></td><td>The header value to write.</td></tr><tr><td><i>Flags (optional)</i></td><td>The string encoding to use. It can be one of the following value:<pre><font face="Courier New, Courier, mono"size="2"> <font color="#924B72">#PB_Ascii</font> (default)<font color="#924B72">#PB_UTF8</font></font></pre>Combined with one of the following value:<pre><font face="Courier New, Courier, mono"size="2"> <font color="#924B72">#PB_CGI_LastHeader</font> : This is the last header written, meaning no more headers can be sent.This flag is mandatory for the last header written.</font></pre></td></tr></table></blockquote><p><b>Return value</b></p><blockquote>Returns non-zero if the header has been successfully written to the CGI output.</blockquote><p><b>Example</b></p><blockquote><pre><font face="Courier New, Courier, mono"size="2"> <b><font color="#3A3966">If</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">InitCGI</font>() <b><font color="#3A3966">Or</font></b> <b><font color="#3A3966">Not</font></b> <font color="#3A3966">ReadCGI</font>()<b><font color="#3A3966">End</font></b><b><font color="#3A3966">EndIf</font></b><font color="#3A3966"> WriteCGIHeader</font>(<font color="#924B72">#PB_CGI_HeaderContentType</font>, "text/html", <font color="#924B72">#PB_CGI_LastHeader</font>)<font color="#3A3966"> WriteCGIString</font>("<html><title>PureBasic - test</title><body>" +"Hello from PureBasic CGI<br>" +"</body></html>")</font></pre></blockquote><p><b>See Also</b></p><blockquote><a href="initcgi.html">InitCGI()</a>, <a href="writecgifile.html">WriteCGIFile()</a>, <a href="writecgistringn.html">WriteCGIStringN()</a></Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=writecgifile.html>WriteCGIFile()</a> - <a href="index.html">CGI Index</a> - <a href="writecgistring.html">WriteCGIString()</a> -><br><br></body></html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型