array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'snmp.geterror.php', 1 => 'SNMP::getError', ), 'up' => array ( 0 => 'class.snmp.php', 1 => 'SNMP', ), 'prev' => array ( 0 => 'snmp.geterrno.php', 1 => 'SNMP::getErrno', ), 'next' => array ( 0 => 'snmp.getnext.php', 1 => 'SNMP::getnext', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/snmp/snmp/geterror.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.4.0, PHP 7, PHP 8)
SNMP::getError — Get last error message
Bu işlevin bağımsız değişkeni yoktur.
String describing error from last SNMP request.
Örnek 1 SNMP::getError() example
<?php
$session = new SNMP(SNMP::VERSION_2c, '127.0.0.1', 'boguscommunity');
var_dump(@$session->get('.1.3.6.1.2.1.1.1.0'));
var_dump($session->getError());
?>
Yukarıdaki örneğin çıktısı:
bool(false) string(26) "No response from 127.0.0.1"