📄 ebrespond.html
字号:
<html>
<head>
<!-- E:/eybuild/doc/export//ebrespond.html - generated by refgen from ebrespond.c -->
<title> ebrespond </title>
</head>
<body bgcolor="#FFFFFF"> <hr>
<a name="top"></a>
<p align=right>
<a href="libIndex.htm"><i>eyBuildLib API Reference : eyBuildLib</i></a></p>
</blockquote><h1>ebrespond</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>ebrespond</strong> - process http request </p>
</blockquote><h4>ROUTINES</h4><blockquote><p>
<p>
<b><a href="./ebrespond.html#print">print</a>( )</b> - write a formatted string and buffered by CSP page<br>
<b><a href="./ebrespond.html#bwrite">bwrite</a>( )</b> - write binary data block<br>
<b><a href="./ebrespond.html#header">header</a>( )</b> - send HTTP header in CSP script<br>
<b><a href="./ebrespond.html#setcookie">setcookie</a>( )</b> - send cookie with HTTP header<br>
<b><a href="./ebrespond.html#redirect">redirect</a>( )</b> - send redirect instruction with HTTP header<br>
<b><a href="./ebrespond.html#ebHeader">ebHeader</a>( )</b> - output HTTP header<br>
<b><a href="./ebrespond.html#ebSetCookie">ebSetCookie</a>( )</b> - send cookie with HTTP header<br>
<b><a href="./ebrespond.html#ebRedirect">ebRedirect</a>( )</b> - redirect to an url<br>
<b><a href="./ebrespond.html#unEscapeUrl">unEscapeUrl</a>( )</b> - decode url<br>
<b><a href="./ebrespond.html#ebUrlEncode">ebUrlEncode</a>( )</b> - encode the URL and store in a global buffer<br>
<b><a href="./ebrespond.html#ebUrlDecode">ebUrlDecode</a>( )</b> - decode the URL and store in a global buffer<br>
<b><a href="./ebrespond.html#ebHtmlEncode">ebHtmlEncode</a>( )</b> - convert plain text into html format text<br>
<b><a href="./ebrespond.html#ebHtmlDecode">ebHtmlDecode</a>( )</b> - convert html format text into plain text <br>
<p>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
process http request
<p>
</blockquote><h4>INCLUDE</h4><blockquote><p>
<b>ebmultiform.h</b>
<p>
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b>ebrequest.h</b>
<hr>
<a name="print"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib : Routines</i></a></p>
</blockquote><h1>print( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>print( )</strong> - write a formatted string and buffered by CSP page</p>
</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int print
(
const char * fmt,
...
)
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
This routine writes a formatted string to a specified file descriptor,
if the csppage is buffered, this routine will not flush until buffer full
or force call flush.
<p>
Its function and syntax are otherwise identical to <b>printf( )</b>.
<p>
</blockquote><h4>RETURNS</h4><blockquote><p>
The number of characters output, or ERROR if there is
an error during output.
<p>
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebrespond.html#top">ebrespond</a></b>, <b><a href="./ebbuff.html#ebprintf">ebprintf</a>( )</b>
<hr>
<a name="bwrite"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib : Routines</i></a></p>
</blockquote><h1>bwrite( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>bwrite( )</strong> - write binary data block</p>
</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int bwrite
(
void * data, /* what to write */
size_t size /* data size */
)
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
This routine is to writes a write binary data block,
it will force flush current CSP buffer before write data.
<p>
</blockquote><h4>NOTE</h4><blockquote><p>
<p>
block data will not be buffered by CSP page.
<p>
</blockquote><h4>RETURNS</h4><blockquote><p>
The number data output, or ERROR during output.
<p>
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebrespond.html#top">ebrespond</a></b>, <b><a href="./ebbuff.html#ebprintf">ebprintf</a>( )</b>
<hr>
<a name="header"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib : Routines</i></a></p>
</blockquote><h1>header( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>header( )</strong> - send HTTP header in CSP script</p>
</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int header
(
const char * fmt, /* format string to write */
... /* optional arguments to format string */
)
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
This routine send HTTP header in CSP script. Header must be sent before
any output flushed from your script (this is a protocol restriction).
<p>
</blockquote><h4>NOTE</h4><blockquote><p>
<p>
dobule "\n" output means the HTTP header output complete, you can not
output any HTTP header any more.
<p>
<pre>header("Status: %s\n", "200 OK");
header("Content-Type: %s\n\n", content_type);
</pre>
</blockquote><h4>RETURNS</h4><blockquote><p>
OK, or ERROR while send HTTP header error
<p>
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebrespond.html#top">ebrespond</a></b>, <b><a href="./ebrespond.html#print">print</a>( )</b>, <b><a href="./ebrespond.html#setcookie">setcookie</a>( )</b>
<hr>
<a name="setcookie"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib : Routines</i></a></p>
</blockquote><h1>setcookie( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>setcookie( )</strong> - send cookie with HTTP header</p>
</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int setcookie
(
char * name,
char * value,
... /* time_t expire, char * path, char * */
/* domain, int secure */
)
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
This routine send cookie with HTTP header.
Like other headers, cookies must be sent before any output flushed from
your script (this is a protocol restriction, make sure CSP page buffer not
flushed is OK).
<p>
The parameter <b>expire</b>, <b>path</b>, <b>domain</b>, <b>secure</b> is not need.
You should make sure the last parameter is set to NULL, eg:
<pre>setcookie("name1", "value1", NULL);
setcookie("name2", "value2", time(NULL)+3600, NULL);
setcookie("name3", "value3", time(NULL)+7200, "/cgi-bin/", NULL);
</pre>
</blockquote><h4>RETURNS</h4><blockquote><p>
OK, or ERROR while send cookie error
<p>
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebrespond.html#top">ebrespond</a></b>, <b><a href="./ebrespond.html#header">header</a>( )</b>, <b><a href="./ebrespond.html#print">print</a>( )</b>
<hr>
<a name="redirect"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib : Routines</i></a></p>
</blockquote><h1>redirect( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>redirect( )</strong> - send redirect instruction with HTTP header</p>
</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int redirect
(
char * p_url,
...
)
</pre>
</blockquote><h4>DESCRIPTION</h4><blockquote><p>
This routine send redirect instruction with HTTP header
Like other headers, redirect instruction must be sent before any output
flushed from your script (this is a protocol restriction).
<p>
<pre>redirect("http://www.eybuild.com");
redirect("/cgi-bin/mm.cgi");
</pre>
</blockquote><h4>RETURNS</h4><blockquote><p>
OK, or ERROR while send redirect instruction error
<p>
</blockquote><h4>SEE ALSO</h4><blockquote><p>
<b><a href="./ebrespond.html#top">ebrespond</a></b>, <b><a href="./ebrespond.html#header">header</a>( )</b>, <b><a href="./ebrespond.html#setcookie">setcookie</a>( )</b>, <b><a href="./ebrespond.html#print">print</a>( )</b>
<hr>
<a name="ebHeader"></a>
<p align=right>
<a href="rtnIndex.htm"><i>eyBuildLib : Routines</i></a></p>
</blockquote><h1>ebHeader( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>
<p><strong>ebHeader( )</strong> - output HTTP header</p>
</blockquote><h4>SYNOPSIS</h4><blockquote><p>
<pre>int ebHeader
(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -