PHP 7.2.0 Release Candidate 2 Released


(PHP 4, PHP 5)

snmp_get_quick_print دریافت مقدار فعلی تنظیمات quick_print کتابخانه UCD


bool snmp_get_quick_print ( void )

بازگرداندن مقدار فعلی ذخیره شده در کتابخانه UCD برای quick_print. quick_print به صورت پیش‌فرض off است.

Return Values

بازگرداندن TRUE اگر quick_print on باشد FALSE در غیر این صورت.


Example #1 مثال snmp_get_quick_print()


See Also

  • snmp_set_quick_print() - Set the value of quick_print within the UCD SNMP library برای توضیح کامل عملکرد quick_print.

add a note add a note

User Contributed Notes 1 note

14 years ago
This can be used to parse the returned values depending on the quick print setting. For example sysUpTime might look something like this: "Timeticks: (34575334) 4 days, 0:02:33.34", but if quick print is enabled it will be on the form: "4:0:2:33.34". To get the same output you can parse it differently, something like:

if(@ $sysUpTime = snmpget($switch,$community,"system.sysUpTime.0")){
       sscanf($sysUpTime, "%d:%d:%d:%d.%d",$day,$hour,$minute,$sec,$ticks);
        $sysUpTime = "$day days, $hour:$minute:$sec.$ticks";
       $sysUpTime = ereg_replace("Timeticks: \([0-9]+\) ","",$sysUpTime);
To Top