Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用此函数通过 snmp 获取结果 snmp2_walk("localhost", "private", "OID");
snmp2_walk("localhost", "private", "OID");
一切正常,但结果以这种形式返回: STRING: "..." STRING: "second"
是否有将此结果转换为普通字符串的函数? 从STRING: "second"到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