<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Returns the error string associated with the given error code</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.yp-cat.html">yp_cat</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.yp-errno.html">yp_errno</a></div> <div class="up"><a href="ref.nis.html">YP/NIS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.yp-err-string" class="refentry"> <div class="refnamediv"> <h1 class="refname">yp_err_string</h1> <p class="verinfo">(PHP 4 >= 4.0.6, PHP 5 <= 5.0.5)</p><p class="refpurpose"><span class="refname">yp_err_string</span> — <span class="dc-title">Returns the error string associated with the given error code</span></p> </div> <div class="refsect1 description" id="refsect1-function.yp-err-string-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">string</span> <span class="methodname"><strong>yp_err_string</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$errorcode</code></span> )</div> <p class="para rdfs-comment"> Returns the error message associated with the given error code. Useful to indicate what exactly went wrong. </p> </div> <div class="refsect1 parameters" id="refsect1-function.yp-err-string-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">errorcode</code></em></span> <dd> <p class="para"> The error code. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.yp-err-string-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the error message, as a string. </p> </div> <div class="refsect1 examples" id="refsect1-function.yp-err-string-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-4687"> <p><strong>Example #1 Example for NIS errors</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /></span><span style="color: #007700">echo </span><span style="color: #DD0000">"Error: " </span><span style="color: #007700">. </span><span style="color: #0000BB">yp_err_string</span><span style="color: #007700">(</span><span style="color: #0000BB">yp_errno</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </p> </div> <div class="refsect1 seealso" id="refsect1-function.yp-err-string-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.yp-errno.html" class="function" rel="rdfs-seeAlso">yp_errno()</a> - Returns the error code of the previous operation</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.yp-cat.html">yp_cat</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.yp-errno.html">yp_errno</a></div> <div class="up"><a href="ref.nis.html">YP/NIS Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>