webserror.htm

来自「goahead是linux下的轻量级web服务器」· HTM 代码 · 共 65 行

HTM
65
字号
<html>
<head>
<title>websError-- GoAhead WebServer API</title>
<link rel="stylesheet" href="../../style/doc.htm" type="text/css">
</head>

<body>
 
<TABLE border=0 width=100% cellspacing=0 cellpadding=0>
<TR>
	<TD class=title-left><b>websError</b></TD>
    <TD class=title-center><b> GoAhead WebServer API</b></TD>
    <TD class=title-right><B> GoAhead EMF</B></TD>
</TR>
</TABLE>

<HR>

<h2>Synopsis</h2>
<p>Return an error message to the requesting browser</p>

<h2>Prototype</h2>

<pre>
#include &quot;webs.h&quot;
   	       
void <b>websError</b>(webs_t wp, int code, char_t *msg, ...);
</pre>

<h2>Parameters</h2>
<p><table width=90%>
    <TR>
        <TD width=40>wp
        <TD>  Web server connection handle
    <TR>
        <TD width=40>code
        <TD>HTTP response code (see <A href="websDone.htm">websDone</A> for codes)
    <TR>
        <TD width=40>msg
        <TD> Message format string with %s and %d parameters<tr>
	<td width=40 cellpadding = 20>...</td>
    <td cellpadding = 20>   Parameters for %s and %d directives</td>
</tr></table></p>

<h2>Description</h2>

<P>The websError procedure can be used to return a request 
response to the user's browser and then close the connection. It 
internally calls 
<STRONG>websDone</STRONG> to close the connection. You can 
use it as you would a printf call with a message format string.&nbsp; </P>

<h2>Return Value</h2>
<p>       None</p>

<h2>Example</h2>
<pre>
websError(wp, 200, &quot;Can't open %s&quot;, filename);
</pre>
<h2>See Also</h2>
<p><A href="websDone.htm">websDone</A></p>

</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?