is_executable() doesn't exist in PHP/Win < 5.0.0

This commit is contained in:
defacer 2005-04-08 05:01:09 +00:00
parent edfc5b5ce1
commit b86e6ba918

View File

@ -5708,7 +5708,7 @@ function get_performance_info() {
if (is_readable('/proc/loadavg') && $loadavg = @file('/proc/loadavg')) {
list($server_load) = explode(' ', $loadavg[0]);
unset($loadavg);
} else if ( is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {
} else if ( function_exists('is_executable') && is_executable('/usr/bin/uptime') && $loadavg = `/usr/bin/uptime` ) {
if (preg_match('/load averages?: (\d+:\d+)/', $loadavg, $matches)) {
$server_load = $matches[1];
} else {