php教程

SNMP::getErrno

(PHP 5 >= 5.4.0, PHP 7)

SNMP::getErrnoGet last error code

说明

public SNMP::getErrno ( void ) : int

Returns error code from last SNMP request.

返回值

Returns one of SNMP error code values described in constants chapter.

范例

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

以上例程会输出:

bool(false)
bool(true)

参见

User Contributed Notes

There are no user contributed notes for this page.

CopyRight © 2008-2022 verySource.Com All Rights reserved. 京ICP备17048824号-1 京公网安备:11010502034788