diff options
author | Minteck <nekostarfan@gmail.com> | 2021-08-08 12:04:30 +0200 |
---|---|---|
committer | Minteck <nekostarfan@gmail.com> | 2021-08-08 12:04:30 +0200 |
commit | 95112b1eb06a4be531ded59563d53a63a8d614e8 (patch) | |
tree | fd3dc676227309c87a39feab9ca458985e327907 /admin/api/serverTime.php | |
parent | 87303b0d3540037fb94efdde24dbaacb2880d6cb (diff) | |
download | main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.gz main-95112b1eb06a4be531ded59563d53a63a8d614e8.tar.bz2 main-95112b1eb06a4be531ded59563d53a63a8d614e8.zip |
Opening!
Diffstat (limited to 'admin/api/serverTime.php')
-rw-r--r-- | admin/api/serverTime.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/admin/api/serverTime.php b/admin/api/serverTime.php index d0db5e3..77ba321 100644 --- a/admin/api/serverTime.php +++ b/admin/api/serverTime.php @@ -1,12 +1,12 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php"; - -$str = file_get_contents('/proc/uptime'); -$num = floatval($str); -$secs = fmod($num, 60); $num = intdiv($num, 60); -$mins = $num % 60; $num = intdiv($num, 60); -$hours = $num % 24; $num = intdiv($num, 24); -$days = $num; - +<?php
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/private/header.api.php";
+
+$str = file_get_contents('/proc/uptime');
+$num = floatval($str);
+$secs = fmod($num, 60); $num = intdiv($num, 60);
+$mins = $num % 60; $num = intdiv($num, 60);
+$hours = $num % 24; $num = intdiv($num, 24);
+$days = $num;
+
echo($days . " day·s, " . $hours . " hour·s, " . $mins . " minute·s, " . ceil($secs) . " second·s");
\ No newline at end of file |