PHP snmp返回结果


PHP snmp return result

我使用这个函数通过snmp获取结果
snmp2_walk("localhost", "private", "OID");

所有工作都很好,但结果返回如下形式:
弦:"……"
STRING: "second"

是否有函数将此结果转换为正常字符串?
STRING: "second"second

我相信这就是你要找的:

snmp_set_quick_print(1); // print just the value, no types
snmp_set_valueretrieval(SNMP_VALUE_PLAIN); // no quotes for strings
http://us1.php.net/manual/en/ref.snmp.php