2013-04-06 88 views
0

我發現這個http://www.php.net/manual/en/class.snmp.php,但我找不到鏈接來下載這個腳本。我嘗試在WEB中搜索,但結果相同。哪裏可以得到SNMP的類

或者是任何使用php擴展來創建一個會話並使用它的方法?

+1

你見過[安裝文檔](http://www.php.net/manual/en/snmp.installation.php)和[requirements](http://www.php.net/manual/en /snmp.requirements.php)? – Havelock 2013-04-06 07:40:54

回答

1

它在tarball中。您可以從official website

下載看看到它:

$ 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 
0

的 「SNMP」 類(在PHP 5.4中引入)是一個 「腳本」;相反,它是一個擴展,可以編譯 PHP,也可以作爲可以啓用或禁用的模塊提供。我懷疑是(1)您使用的是舊版本的PHP,或者(2)您沒有安裝或啓用SNMP擴展。