List Info

Thread: note 22548 deleted from ref.exec by hholzgra




note 22548 deleted from ref.exec by hholzgra
user name
2006-07-30 13:22:52
Note Submitter: ronnyab at online dot no 

----

Instead of getting the whole package of load average and
date, get only the days of uptime!
Use this code:

$uptime = exec("expr $(awk '{print $1}' <
/proc/uptime | awk -F. '{print $1}' ) / 86400");
print("Uptime: $uptime days");

This will print "Uptime x days"!

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )