0, "Days" = 0, "hours" = 0, "minutes" = 0, "Seconds" and 0,); if ($time >= 31556926) {$value ["years"] = floor ($time/31556926); $time = ($time%31556926);} if ($time >= 86400) {$value [' days '] = Floor ($time/86400); $time = ($time%86400);} if ($time >= 3600) {$value ["hours"] = Floor ($time/3600); $time = ($time%3600);} if ($time >=) {$value ["minutes"] = Floor ($time/60); $time = ($time%60);} $value ["seconds"] = floor ($time); return (array) $value;} Else{return (bool) FALSE;}} The time created by this site $site_create_time = strtotime (' 2013-05-22 00:00:00 '); $time = times ()-$site _create_time; $uptime = Sec2time ($ time);? > Operation of the site:
years
,
hours,
minutes,
seconds
.
http://www.bkjia.com/PHPjc/771955.html www.bkjia.com true http://www.bkjia.com/PHPjc/771955.html techarticle php//Set time zone Date_default_timezone_set (' Asia/shanghai ');/** * seconds to time, format month day seconds/minute * @author wangyupeng129@126.com * @ param int $time * @return arr ...