📄 function.snmp-set-quick-print.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Set the value of quick_print within the UCD SNMP library</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.snmp-set-oid-output-format.html">snmp_set_oid_output_format</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.snmp-set-valueretrieval.html">snmp_set_valueretrieval</a></div> <div class="up"><a href="ref.snmp.html">SNMP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.snmp-set-quick-print" class="refentry"> <div class="refnamediv"> <h1 class="refname">snmp_set_quick_print</h1> <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">snmp_set_quick_print</span> — <span class="dc-title">Set the value of quick_print within the UCD SNMP library </span></p> </div> <div class="refsect1 description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><span class="type void">void</span></span> <span class="methodname"><b><b>snmp_set_quick_print</b></b></span> ( <span class="methodparam"><span class="type">bool</span> <tt class="parameter">$quick_print</tt></span> )</div> <p class="para rdfs-comment"> Sets the value of quick_print within the UCD SNMP library. When this is set (1), the SNMP library will return 'quick printed' values. This means that just the value will be printed. When quick_print is not enabled (default) the UCD SNMP library prints extra information including the type of the value (i.e. IpAddress or OID). Additionally, if quick_print is not enabled, the library prints additional hex values for all strings of three characters or less. </p> <p class="para"> By default the UCD SNMP library returns verbose values, quick_print is used to return only the value. </p> <p class="para"> Currently strings are still returned with extra quotes, this will be corrected in a later release. </p> </div> <div class="refsect1 parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><i><tt class="parameter">quick_print</tt></i></span> <dd> <p class="para"> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 examples"> <h3 class="title">Examples</h3> <p class="para"> Setting quick_print is often used when using the information returned rather then displaying it. </p> <p class="para"> <div class="example"> <p><b>Example #1 Using <b>snmp_set_quick_print()</b></b></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB"><?php<br />snmp_set_quick_print</span><span style="color: #007700">(</span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$a </span><span style="color: #007700">= </span><span style="color: #0000BB">snmpget</span><span style="color: #007700">(</span><span style="color: #DD0000">"127.0.0.1"</span><span style="color: #007700">, </span><span style="color: #DD0000">"public"</span><span style="color: #007700">, </span><span style="color: #DD0000">".1.3.6.1.2.1.2.2.1.9.1"</span><span style="color: #007700">);<br />echo </span><span style="color: #DD0000">"$a\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">snmp_set_quick_print</span><span style="color: #007700">(</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$a </span><span style="color: #007700">= </span><span style="color: #0000BB">snmpget</span><span style="color: #007700">(</span><span style="color: #DD0000">"127.0.0.1"</span><span style="color: #007700">, </span><span style="color: #DD0000">"public"</span><span style="color: #007700">, </span><span style="color: #DD0000">".1.3.6.1.2.1.2.2.1.9.1"</span><span style="color: #007700">);<br />echo </span><span style="color: #DD0000">"$a\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?></span></span></code></div> </div> <div class="example-contents"><p>The above example will output something similar to:</p></div> <div class="example-contents"><pre><div class="cdata"><pre>'Timeticks: (0) 0:00:00.00''0:00:00.00'</pre></div> </pre></div> </div> </p> </div> <div class="refsect1 seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="function.snmp-get-quick-print.html" class="function" rel="rdfs-seeAlso">snmp_get_quick_print()</a></li> </ul> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.snmp-set-oid-output-format.html">snmp_set_oid_output_format</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.snmp-set-valueretrieval.html">snmp_set_valueretrieval</a></div> <div class="up"><a href="ref.snmp.html">SNMP Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -