downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SNMP::getError> <SNMP::get
[edit] Last updated: Thu, 20 Jun 2013

view this page in

SNMP::getErrno

(PHP 5 >= 5.4.0)

SNMP::getErrnoRécupère le dernier code erreur

Description

int SNMP::getErrno ( void )

Retourne le code erreur de la dernière requête SNMP.

Valeurs de retour

Retourne un des codes erreurs SNMP décrits dans le chapitre sur les constantes.

Exemples

Exemple #1 SNMP::getErrno() 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->getErrno() == SNMP::ERRNO_TIMEOUT);
//var_dump($session->getError());
?>

L'exemple ci-dessus va afficher :

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

Voir aussi



add a note add a note User Contributed Notes SNMP::getErrno - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites