0

我找到了这个http://www.php.net/manual/en/class.snmp.php,但我找不到下载这个脚本的链接。我尝试在WEB中搜索,但结果相同。

或者是否有任何带有 php 扩展名的方法来创建一个会话并使用它?

4

2 回答 2

2

它在压缩包中。你可以从官网下载

看看它:

$ tar jtf php-5.4.13.tar.bz2 | grep snmp
php-5.4.13/ext/snmp/
php-5.4.13/ext/snmp/config.m4
php-5.4.13/ext/snmp/config.w32
php-5.4.13/ext/snmp/CREDITS
php-5.4.13/ext/snmp/php_snmp.h
php-5.4.13/ext/snmp/snmp.c
php-5.4.13/ext/snmp/snmp.dsp
php-5.4.13/ext/snmp/tests/
php-5.4.13/ext/snmp/tests/bug60749.phpt
php-5.4.13/ext/snmp/tests/bug64124.phpt
php-5.4.13/ext/snmp/tests/clean.inc
php-5.4.13/ext/snmp/tests/generic_timeout_error.phpt
php-5.4.13/ext/snmp/tests/ipv6.phpt
php-5.4.13/ext/snmp/tests/README
php-5.4.13/ext/snmp/tests/skipif.inc
php-5.4.13/ext/snmp/tests/snmp-object-errno-errstr.phpt
php-5.4.13/ext/snmp/tests/snmp-object-error.phpt
php-5.4.13/ext/snmp/tests/snmp-object-properties.phpt
php-5.4.13/ext/snmp/tests/snmp-object-setSecurity_error.phpt
php-5.4.13/ext/snmp/tests/snmp-object.phpt
php-5.4.13/ext/snmp/tests/snmp2_get.phpt
php-5.4.13/ext/snmp/tests/snmp2_getnext.phpt
php-5.4.13/ext/snmp/tests/snmp2_real_walk.phpt
php-5.4.13/ext/snmp/tests/snmp2_set-nomib.phpt
php-5.4.13/ext/snmp/tests/snmp2_set.phpt
php-5.4.13/ext/snmp/tests/snmp2_walk.phpt
php-5.4.13/ext/snmp/tests/snmp3-error.phpt
php-5.4.13/ext/snmp/tests/snmp3.phpt
php-5.4.13/ext/snmp/tests/snmp_get_quick_print.phpt
php-5.4.13/ext/snmp/tests/snmp_get_valueretrieval.phpt
php-5.4.13/ext/snmp/tests/snmp_getvalue.phpt
php-5.4.13/ext/snmp/tests/snmp_include.inc
php-5.4.13/ext/snmp/tests/snmp_read_mib.phpt
php-5.4.13/ext/snmp/tests/snmp_set_enum_print.phpt
php-5.4.13/ext/snmp/tests/snmp_set_oid_output_format.phpt
php-5.4.13/ext/snmp/tests/snmpd.conf
php-5.4.13/ext/snmp/tests/snmpget.phpt
php-5.4.13/ext/snmp/tests/snmpgetnext.phpt
php-5.4.13/ext/snmp/tests/snmprealwalk.phpt
php-5.4.13/ext/snmp/tests/snmpset-nomib.phpt
php-5.4.13/ext/snmp/tests/snmpset.phpt
php-5.4.13/ext/snmp/tests/snmpwalk.phpt
php-5.4.13/ext/snmp/tests/wrong_hostname.phpt
于 2013-04-06T07:42:45.567 回答
1

“SNMP”类(在 PHP 5.4 中引入)不是“脚本”;相反,它是一个扩展,可以编译PHP 中,也可以作为可以启用或禁用的模块提供。我怀疑(1)您使用的是旧版本的 PHP,或者(2)您没有安装或启用 SNMP 扩展。

于 2014-01-07T04:35:58.937 回答