Shell_exec (), some hosts have disabled this by default, looking for a walk

I have a problem with shell_exec () on some hosts, by default it is disabled on certain web hosts. I am looking at running the same script without using shell_exec.

I am looking for an alternative way to get the same result, any help would be appreciated.

$uptime = shell_exec("cut -d. -f1 /proc/uptime");
$days = floor($uptime/60/60/24);
$hours = $uptime/60/60%24;
$mins = $uptime/60%60;
$secs = $uptime%60;
echo "<div><hr><strong>Uptime</strong>: this server is up $days days $hours hours $mins minutes and $secs seconds</div>";
+4
source share
1 answer

. phpSysinfo/Linfo, , , , /proc, , . , open_basedir , .

, .

0

Source: https://habr.com/ru/post/1609257/


All Articles