PHP 5.5.16 is released

SNMP::getError

(PHP 5 >= 5.4.0)

SNMP::getErrorGet last error message

Descrição

public string SNMP::getError ( void )

Returns string with error from last SNMP request.

Valor Retornado

String describing error from last SNMP request.

Exemplos

Exemplo #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());
?>

O exemplo acima irá imprimir:

bool(false)
string(26) "No response from 127.0.0.1"

Veja Também

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top