search
HomeBackend DevelopmentPHP TutorialImplementation code of PHP server probe

Implementation code of PHP server probe

Mar 01, 2018 am 10:43 AM
phpcodeserver

本文主要和大家分享PHP服务器探针的实现代码,文章有点长,希望能帮助到大家。

<?phperror_reporting (0); //抑制所有错误信息@header("content-Type: text/html; charset=utf-8"); //语言强制ob_start();
date_default_timezone_set(&#39;Asia/Shanghai&#39;);//此句用于消除时间差$time_start = microtime_float();/**
*
*/class ServerInfo{
    //服务器参数
    public $S = array(        &#39;YourIP&#39;, //你的IP
        &#39;DomainIP&#39;, //服务器域名和IP及进程用户名
        &#39;Flag&#39;, //服务器标识
        &#39;OS&#39;, //服务器操作系统具体
        &#39;Language&#39;, //服务器语言
        &#39;Name&#39;, //服务器主机名
        &#39;Email&#39;, //服务器管理员邮箱
        &#39;WebEngine&#39;, //服务器WEB服务引擎
        &#39;WebPort&#39;, //web服务端口
        &#39;WebPath&#39;, //web路径
        &#39;ProbePath&#39;, //本脚本所在路径
        &#39;sTime&#39; //服务器时间
        );    public $sysInfo; //系统信息,windows和linux
    public $CPU_Use;    public $hd = array(        &#39;t&#39;, //硬盘总量
        &#39;f&#39;, //可用
        &#39;u&#39;, //已用
        &#39;PCT&#39;, //使用率
        );    public $NetWork = array(        &#39;NetWorkName&#39;, //网卡名称
        &#39;NetOut&#39;, //出网总量
        &#39;NetInput&#39;, //入网总量
        &#39;OutSpeed&#39;, //出网速度
        &#39;InputSpeed&#39; //入网速度
        ); //网卡流量

    function __construct(){
        $this->S['YourIP'] = @$_SERVER['REMOTE_ADDR'];        $domain = $this->OS()?$_SERVER['SERVER_ADDR']:@gethostbyname($_SERVER['SERVER_NAME']);        $this->S['DomainIP'] = @get_current_user().' - '.$_SERVER['SERVER_NAME'].'('.$domain.')';        $this->S['Flag'] = empty($this->sysInfo['win_n'])?@php_uname():$this->sysInfo['win_n'];        $os = explode(" ", php_uname());        $oskernel = $this->OS()?$os[2]:$os[1];        $this->S['OS'] = $os[0].'内核版本:'.$oskernel;        $this->S['Language'] = getenv("HTTP_ACCEPT_LANGUAGE");        $this->S['Name'] = $this->OS()?$os[1]:$os[2];        $this->S['Email'] = $_SERVER['SERVER_ADMIN'];        $this->S['WebEngine'] = $_SERVER['SERVER_SOFTWARE'];        $this->S['WebPort'] = $_SERVER['SERVER_PORT'];        $this->S['WebPath'] = $_SERVER['DOCUMENT_ROOT']?str_replace('\\','/',$_SERVER['DOCUMENT_ROOT']):str_replace('\\','/',dirname(__FILE__));        $this->S['ProbePath'] = str_replace('\\','/',__FILE__)?str_replace('\\','/',__FILE__):$_SERVER['SCRIPT_FILENAME'];        $this->S['sTime'] = date('Y-m-d H:i:s');        $this->sysInfo = $this->GetsysInfo();        //var_dump($this->sysInfo);

        $CPU1 = $this->GetCPUUse();
        sleep(1);        $CPU2 = $this->GetCPUUse();        $data = $this->GetCPUPercent($CPU1, $CPU2);        $this->CPU_Use =$data['cpu0']['user']."%us,  ".$data['cpu0']['sys']."%sy,  ".$data['cpu0']['nice']."%ni, ".$data['cpu0']['idle']."%id,  ".$data['cpu0']['iowait']."%wa,  ".$data['cpu0']['irq']."%irq,  ".$data['cpu0']['softirq']."%softirq";        if(!$this->OS()) $this->CPU_Use = '目前只支持Linux系统';        $this->hd = $this->GetDisk();        $this->NetWork = $this->GetNetWork();
    }    public function OS(){
        return DIRECTORY_SEPARATOR=='/'?true:false;
    }    public function GetsysInfo(){
        switch (PHP_OS) {            case 'Linux':                $sysInfo = $this->sys_linux();                break;            case 'FreeBSD':                $sysInfo = $this->sys_freebsd();                break;            default:                # code...
                break;
        }        return $sysInfo;
    }    public function sys_linux(){ //linux系统探测
        $str = @file("/proc/cpuinfo"); //获取CPU信息
        if(!$str) return false;        $str = implode("", $str);
        @preg_match_all("/model\s+name\s{0,}\:+\s{0,}([\w\s\)\@.-]+)([\r\n]+)/s", $str, $model); //CPU 名称
        @preg_match_all("/cpu\s+MHz\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $mhz); //CPU频率
        @preg_match_all("/cache\s+size\s{0,}\:+\s{0,}([\d\.]+\s{0,}[A-Z]+[\r\n]+)/", $str, $cache); //CPU缓存
        @preg_match_all("/bogomips\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $bogomips); //
        if(is_array($model[1])){            $cpunum = count($model[1]);            $x1 = $cpunum>1?' ×'.$cpunum:'';            $mhz[1][0] = ' | 频率:'.$mhz[1][0];            $cache[1][0] = ' | 二级缓存:'.$cache[1][0];            $bogomips[1][0] = ' | Bogomips:'.$bogomips[1][0];            $res['cpu']['num'] = $cpunum;            $res['cpu']['model'][] = $model[1][0].$mhz[1][0].$cache[1][0].$bogomips[1][0].$x1;            if(is_array($res['cpu']['model'])) $res['cpu']['model'] = implode("<br>", $res['cpu']['model']);            if(is_array($res['cpu']['mhz'])) $res['cpu']['mhz'] = implode("<br>", $res['cpu']['mhz']);            if(is_array($res['cpu']['cache'])) $res['cpu']['cache'] = implode("<br>", $res['cpu']['cache']);            if(is_array($res['cpu']['bogomips'])) $res['cpu']['bogomips'] = implode("<br>", $res['cpu']['bogomips']);
        }        //服务器运行时间
        $str = @file("/proc/uptime");        if(!$str) return false;        $str = explode(" ", implode("", $str));        $str = trim($str[0]);        $min = $str/60;        $hours = $min/60;        $days = floor($hours/24);        $hours = floor($hours-($days*24));        $min = floor($min-($days*60*24)-($hours*60));        $res['uptime'] = $days."天".$hours."小时".$min."分钟";        //内存
        $str = @file("/proc/meminfo");        if(!$str) return false;        $str = implode("", $str);
        preg_match_all("/MemTotal\s{0,}\:+\s{0,}([\d\.]+).+?MemFree\s{0,}\:+\s{0,}([\d\.]+).+?Cached\s{0,}\:+\s{0,}([\d\.]+).+?SwapTotal\s{0,}\:+\s{0,}([\d\.]+).+?SwapFree\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buf);
        preg_match_all("/Buffers\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buffers);        $resmem['memTotal'] = round($buf[1][0]/1024, 2);        $resmem['memFree'] = round($buf[2][0]/1024, 2);        $resmem['memBuffers'] = round($buffers[1][0]/1024, 2);        $resmem['memCached'] = round($buf[3][0]/1024, 2);        $resmem['memUsed'] = $resmem['memTotal']-$resmem['memFree'];        $resmem['memPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memUsed']/$resmem['memTotal']*100,2):0;        $resmem['memRealUsed'] = $resmem['memTotal'] - $resmem['memFree'] - $resmem['memCached'] - $resmem['memBuffers']; //真实内存使用
        $resmem['memRealFree'] = $resmem['memTotal'] - $resmem['memRealUsed']; //真实空闲
        $resmem['memRealPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memRealUsed']/$resmem['memTotal']*100,2):0; //真实内存使用率
        $resmem['memCachedPercent'] = (floatval($resmem['memCached'])!=0)?round($resmem['memCached']/$resmem['memTotal']*100,2):0; //Cached内存使用率
        $resmem['swapTotal'] = round($buf[4][0]/1024, 2);        $resmem['swapFree'] = round($buf[5][0]/1024, 2);        $resmem['swapUsed'] = round($resmem['swapTotal']-$resmem['swapFree'], 2);        $resmem['swapPercent'] = (floatval($resmem['swapTotal'])!=0)?round($resmem['swapUsed']/$resmem['swapTotal']*100,2):0;        $resmem = $this->formatmem($resmem); //格式化内存显示单位
        $res = array_merge($res,$resmem);        // LOAD AVG 系统负载
        $str = @file("/proc/loadavg");        if (!$str) return false;        $str = explode(" ", implode("", $str));        $str = array_chunk($str, 4);        $res['loadAvg'] = implode(" ", $str[0]);        return $res;
    }    public function sys_freebsd(){ //freeBSD系统探测
        $res['cpu']['num']   = do_command('sysctl','hw.ncpu'); //CPU
        $res['cpu']['model'] = do_command('sysctl','hw.model');        $res['loadAvg']      = do_command('sysctl','vm.loadavg'); //Load AVG  系统负载
        //uptime
        $buf = do_command('sysctl','kern.boottime');        $buf = explode(' ', $buf);        $sys_ticks = time()-intval($buf[3]);        $min = $sys_ticks/60;        $hours = $min/60;        $days = floor($hours/24);        $hours = floor($hours-($days*24));        $min = floor($min-($days*60*24)-($hours*60));        $res['uptime'] = $days.'天'.$hours.'小时'.$min.'分钟';        //内存
        $buf = do_command('sysctl','hw.physmem');        $resmem['memTotal'] = round($buf/1024/1024, 2);        $str = do_command('sysctl','vm.vmtotal');
        preg_match_all("/\nVirtual Memory[\:\s]*\(Total[\:\s]*([\d]+)K[\,\s]*Active[\:\s]*([\d]+)K\@.-]+)([\r\n]+)/s", $str, $model); //CPU 名称         @preg_match_all("/cpu\s+MHz\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $mhz); //CPU频率         @preg_match_all("/cache\s+size\s{0,}\:+\s{0,}([\d\.]+\s{0,}[A-Z]+[\r\n]+)/", $str, $cache); //CPU缓存         @preg_match_all("/bogomips\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $bogomips); //         if(is_array($model[1])){             $cpunum = count($model[1]);             $x1 = $cpunum>1?' ×'.$cpunum:'';             $mhz[1][0] = ' | 频率:'.$mhz[1][0];             $cache[1][0] = ' | 二级缓存:'.$cache[1][0];             $bogomips[1][0] = ' | Bogomips:'.$bogomips[1][0];             $res['cpu']['num'] = $cpunum;             $res['cpu']['model'][] = $model[1][0].$mhz[1][0].$cache[1][0].$bogomips[1][0].$x1;             if(is_array($res['cpu']['model'])) $res['cpu']['model'] = implode("<br>", $res['cpu']['model']);             if(is_array($res['cpu']['mhz'])) $res['cpu']['mhz'] = implode("<br>", $res['cpu']['mhz']);             if(is_array($res['cpu']['cache'])) $res['cpu']['cache'] = implode("<br>", $res['cpu']['cache']);             if(is_array($res['cpu']['bogomips'])) $res['cpu']['bogomips'] = implode("<br>", $res['cpu']['bogomips']);         }         //服务器运行时间         $str = @file("/proc/uptime");         if(!$str) return false;         $str = explode(" ", implode("", $str));         $str = trim($str[0]);         $min = $str/60;         $hours = $min/60;         $days = floor($hours/24);         $hours = floor($hours-($days*24));         $min = floor($min-($days*60*24)-($hours*60));         $res['uptime'] = $days."天".$hours."小时".$min."分钟";         //内存         $str = @file("/proc/meminfo");         if(!$str) return false;         $str = implode("", $str);         preg_match_all("/MemTotal\s{0,}\:+\s{0,}([\d\.]+).+?MemFree\s{0,}\:+\s{0,}([\d\.]+).+?Cached\s{0,}\:+\s{0,}([\d\.]+).+?SwapTotal\s{0,}\:+\s{0,}([\d\.]+).+?SwapFree\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buf);         preg_match_all("/Buffers\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buffers);         $resmem['memTotal'] = round($buf[1][0]/1024, 2);         $resmem['memFree'] = round($buf[2][0]/1024, 2);         $resmem['memBuffers'] = round($buffers[1][0]/1024, 2);         $resmem['memCached'] = round($buf[3][0]/1024, 2);         $resmem['memUsed'] = $resmem['memTotal']-$resmem['memFree'];         $resmem['memPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memUsed']/$resmem['memTotal']*100,2):0;         $resmem['memRealUsed'] = $resmem['memTotal'] - $resmem['memFree'] - $resmem['memCached'] - $resmem['memBuffers']; //真实内存使用         $resmem['memRealFree'] = $resmem['memTotal'] - $resmem['memRealUsed']; //真实空闲         $resmem['memRealPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memRealUsed']/$resmem['memTotal']*100,2):0; //真实内存使用率         $resmem['memCachedPercent'] = (floatval($resmem['memCached'])!=0)?round($resmem['memCached']/$resmem['memTotal']*100,2):0; //Cached内存使用率         $resmem['swapTotal'] = round($buf[4][0]/1024, 2);         $resmem['swapFree'] = round($buf[5][0]/1024, 2);         $resmem['swapUsed'] = round($resmem['swapTotal']-$resmem['swapFree'], 2);         $resmem['swapPercent'] = (floatval($resmem['swapTotal'])!=0)?round($resmem['swapUsed']/$resmem['swapTotal']*100,2):0;         $resmem = $this->formatmem($resmem); //格式化内存显示单位         $res = array_merge($res,$resmem);         // LOAD AVG 系统负载         $str = @file("/proc/loadavg");         if (!$str) return false;         $str = explode(" ", implode("", $str));         $str = array_chunk($str, 4);         $res['loadAvg'] = implode(" ", $str[0]);         return $res;     }     public function sys_freebsd(){ //freeBSD系统探测         $res['cpu']['num']   = do_command('sysctl','hw.ncpu'); //CPU         $res['cpu']['model'] = do_command('sysctl','hw.model');         $res['loadAvg']      = do_command('sysctl','vm.loadavg'); //Load AVG  系统负载         //uptime         $buf = do_command('sysctl','kern.boottime');         $buf = explode(' ', $buf);         $sys_ticks = time()-intval($buf[3]);         $min = $sys_ticks/60;         $hours = $min/60;         $days = floor($hours/24);         $hours = floor($hours-($days*24));         $min = floor($min-($days*60*24)-($hours*60));         $res['uptime'] = $days.'天'.$hours.'小时'.$min.'分钟';         //内存         $buf = do_command('sysctl','hw.physmem');         $resmem['memTotal'] = round($buf/1024/1024, 2);         $str = do_command('sysctl','vm.vmtotal');         preg_match_all("/\nVirtual Memory[\:\s]*\(Total[\:\s]*([\d]+)K[\,\s]*Active[\:\s]*([\d]+)K\n/i", $str, $buff, PREG_SET_ORDER);
        preg_match_all("/\nReal Memory[\:\s]*Total[\s]∗([\d]+)K[\s]∗Active[\s]∗([\d]+)KTotal[\s]∗([\d]+)K[\s]∗Active[\s]∗([\d]+)K\n/i", $str, $buf, PREG_SET_ORDER);        $resmem['memRealUsed'] = round($buf[0][2]/1024, 2);        $resmem['memCached'] = round($buff[0][2]/1024, 2);        $resmem['memUsed'] = round($buf[0][1]/1024, 2)+$resmem['memCached'];        $resmem['memFree'] = $resmem['memTotal']-$resmem['memUsed'];        $resmem['memPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memUsed']/$resmem['memTotal']*100,2):0;        $resmem['memRealPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memRealUsed']/$resmem['memTotal']*100,2):0;        $resmem = $this->formatmem($resmem);        $res = array_merge($res,$resmem);        return $res;
    }    public function do_command($cName, $args){ //执行系统命令FreeBSD
        $cName = empty($cName)?'sysctl':timr($cName);        if(empty($args)) return false;        $args = '-n '.$args;        $buffers = '';        $command = find_command($cName);        if(!$command) return false;        if($fp = @popen("$command $args", 'r')){            while (!@feof($fp)) {                $buffers .= @fgets($fp, 4096);
            }
            pclose($fp);            return trim($buffers);
        }        return false;
    }    public function find_command($cName){ //确定shell位置
        $path = array('/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin');        foreach($path as $p) {            if (@is_executable("$p/$commandName")) return "$p/$commandName";
        }        return false;
    }    public function GetCPUUse(){
        $data = @file('/proc/stat');        $cores = array();        foreach ($data as $line) {            if(preg_match('/^cpu[0-9]/', $line)){                $info = explode(' ', $line);                $cores[]=array('user'=>$info[1],'nice'=>$info[2],'sys' => $info[3],'idle'=>$info[4],'iowait'=>$info[5],'irq' => $info[6],'softirq' => $info[7]);
            }
        }        return $cores;
    }    public function GetCPUPercent($CPU1,$CPU2){
        $num = count($CPU1);        if($num!==count($CPU2)) return;        $cups = array();        for ($i=0; $i $y)                $cpu[$x] = round($y/$total*100, 2);            $cpus['cpu'.$i] = $cpu;
        }        return $cpus;
    }    public function GetDisk(){ //获取硬盘情况
        $d['t'] = round(@disk_total_space(".")/(1024*1024*1024),3);        $d['f'] = round(@disk_free_space(".")/(1024*1024*1024),3);        $d['u'] = $d['t']-$d['f'];        $d['PCT'] = (floatval($d['t'])!=0)?round($d['u']/$d['t']*100,2):0;        return $d;
    }    private function formatmem($mem){ //格试化内存显示单位
        if(!is_array($mem)) return $mem;        $tmp = array(            'memTotal', 'memUsed', 'memFree', 'memPercent',            'memCached', 'memRealPercent',            'swapTotal', 'swapUsed', 'swapFree', 'swapPercent'
        );        foreach ($mem as $k=>$v) {            if(!strpos($k, 'Percent')){                $v = $vformatsize($info[10][0]);            $res['NetInput'][$i] = $this->formatsize($info[2][0]);            $res['NetWorkName'][$i] = $info[1][0];
        }        return $res;
    }    public function formatsize($size) { //单位转换
        $danwei=array(' B ',' K ',' M ',' G ',' T ');        $allsize=array();        $i=0;        for($i = 0; $i =0; $l--) {            $allsize1[$l]=floor($size/pow(1024,$l));            $allsize[$l]=$allsize1[$l]-$allsize1[$l+1]*1024;
        }        $len=count($allsize);        for($j = $len-1; $j >=0; $j--) {            $fsize=$fsize.$allsize[$j].$danwei[$j];
        }        return $fsize;
    }    public function phpexts(){ //以编译模块
        $able = get_loaded_extensions();        $str = '';        foreach ($able as $key => $value) {            if ($key!=0 && $key%13==0) {                $str .= '<br>';
            }            $str .= "$value  ";
        }        return $str;
    }    public function show($varName){ //检测PHP设置参数
        switch($result = get_cfg_var($varName)){            case 0:                return '<font>×</font>';            break;            case 1:                return '<font>√</font>';            break;            default:                return $result;            break;
        }
    }    public function GetDisFuns(){
        $disFuns=get_cfg_var("disable_functions");        $str = '';        if(empty($disFuns)){            $str = '<font>×</font>';
        }else{            $disFunsarr =  explode(',',$disFuns);            foreach ($disFunsarr as $key=>$value) {                if ($key!=0 && $key%8==0) {                    $str .= '<br>';
                }                $str .= "$value  ";
            }
        }        return $str;
    }    public function isfun($funName='',$j=0){ // 检测函数支持
        if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName, $tmp)) return '错误';        if(!$j){            return (function_exists($funName) !== false) ? '<font>√</font>' : '<font>×</font>';
        }else{            return (function_exists($funName) !== false) ? '√' : '×';
        }
    }    public function GetGDVer(){
        $strgd = '<font>×</font>';        if(function_exists(gd_info)) {            $gd_info = @gd_info();            $strgd = $gd_info["GD Version"];
        }        return $strgd;
    }    public function GetZendInfo(){
        $zendInfo = array();        $zendInfo['ver'] = zend_version()?zend_version():'<font>×</font>';        $phpv = substr(PHP_VERSION,2,1);        $zendInfo['loader'] = $phpv>2?'ZendGuardLoader[启用]':'Zend Optimizer';        if($phpv>2){            $zendInfo['html'] = get_cfg_var("zend_loader.enable")?'<font>√</font>':'<font>×</font>';
        }elseif(function_exists('zend_optimizer_version')){            $zendInfo['html'] = zend_optimizer_version();
        }else{            $zendInfo['html']= (get_cfg_var("zend_optimizer.optimization_level") ||
                                get_cfg_var("zend_extension_manager.optimizer_ts") ||
                                get_cfg_var("zend.ze1_compatibility_mode") ||
                                get_cfg_var("zend_extension_ts"))?'<font>√</font>':'<font>×</font>';
        }        return $zendInfo;
    }    public function GetIconcube(){
        $str = '<font>×</font>';        if(extension_loaded('ionCube Loader')){            $ys = ionCube_Loader_version();            $gm = '.'.(int)substr($ys, 3, 2);            $str = $ys.$gm;
        }        return $str;
    }    public function CHKModule($cName){
        if(empty($cName)) return '错误';        $str = phpversion($cName);        return empty($str)?'<font>×</font>':$str;
    }    public function GetDBVer($dbname){
        if(empty($dbname)) return '错误';        switch ($dbname) {            case 'mysql':                if(function_exists("mysql_get_server_info")){                    $s = @mysql_get_server_info();                    $s = $s ? '  mysql_server 版本:'.$s:'';                    $c = @mysql_get_client_info();                    $c = $c ? '  mysql_client 版本:'.$c:'';                    return $s.$c;
                }                return '';                break;            case 'sqlite':                if(extension_loaded('sqlite3')){                    $sqliteVer = SQLite3::version();                    $str = '<font>√</font>';                    $str .= 'SQLite3 Ver'.$sqliteVer['versionString'];
                }else{                    $str = $this->isfun('sqlite_close');                    if(strpos($str, '√')!==false){                        $str .= '  版本:'.sqlite_libversion();
                    }
                }                return $str;                break;            default:                return '';                break;
        }
    }
}$title = 'PHP服务器信息探针';$j_version = '1.0.0';$S = new ServerInfo();$phpSelf = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];$disFuns=get_cfg_var("disable_functions");$disFuns = strpos('phpinfo', needle)?'<font>×</font>':"<a>PHPINFO</a>";$strcookies = isset($_COOKIE)?'<font>√</font>' : '<font>×</font>';$strsmtp = get_cfg_var("SMTP")?'<font>√</font>' : '<font>×</font>';$smtpadd = get_cfg_var("SMTP")?get_cfg_var("SMTP"):'<font>×</font>';//ajax调用实时刷新if ($_GET['act'] == "rt"){    $arr=array('useSpace'=>$S->hd['u'],        'freeSpace'=>$S->hd['f'],        'hdPercent'=>$S->hd['PCT'],        'barhdPercent'=>$S->hd['PCT'].'%',        'TotalMemory'=>$S->sysInfo['memTotal'],        'UsedMemory'=>$S->sysInfo['memUsed'],        'FreeMemory'=>$S->sysInfo['memFree'],        'CachedMemory'=>$S->sysInfo['memCached'],        'Buffers'=>$S->sysInfo['memBuffers'],        'TotalSwap'=>$S->sysInfo['swapTotal'],        'swapUsed'=>$S->sysInfo['swapUsed'],        'swapFree'=>$S->sysInfo['swapFree'],        'loadAvg'=>$S->sysInfo['loadAvg'],        'uptime'=>$S->sysInfo['uptime'],        'freetime'=>"$freetime",        'bjtime'=>"$bjtime",        'stime'=>$S->S['sTime'],        'cpuuse'=>$S->CPU_Use,        'memRealPercent'=>$S->sysInfo['memRealPercent'],        'memRealUsed'=>$S->sysInfo['memRealUsed'],        'memRealFree'=>$S->sysInfo['memRealFree'],        'memPercent'=>$S->sysInfo['memPercent'].'%',        'memCachedPercent'=>$S->sysInfo['memCachedPercent'],        'barmemCachedPercent'=>$S->sysInfo['memCachedPercent'].'%',        'swapPercent'=>$S->sysInfo['swapPercent'],        'barmemRealPercent'=>$S->sysInfo['memRealPercent'].'%',        'barswapPercent'=>$S->sysInfo['swapPercent'].'%',        'NetOut2'=>$S->NetWork['NetOut'][2],        'NetOut3'=>$S->NetWork['NetOut'][3],        'NetOut4'=>$S->NetWork['NetOut'][4],        'NetOut5'=>$S->NetWork['NetOut'][5],        'NetOut6'=>$S->NetWork['NetOut'][6],        'NetOut7'=>$S->NetWork['NetOut'][7],        'NetOut8'=>$S->NetWork['NetOut'][8],        'NetOut9'=>$S->NetWork['NetOut'][9],        'NetOut10'=>$S->NetWork['NetOut'][10],        'NetInput2'=>$S->NetWork['NetInput'][2],        'NetInput3'=>$S->NetWork['NetInput'][3],        'NetInput4'=>$S->NetWork['NetInput'][4],        'NetInput5'=>$S->NetWork['NetInput'][5],        'NetInput6'=>$S->NetWork['NetInput'][6],        'NetInput7'=>$S->NetWork['NetInput'][7],        'NetInput8'=>$S->NetWork['NetInput'][8],        'NetInput9'=>$S->NetWork['NetInput'][9],        'NetInput10'=>$S->NetWork['NetInput'][10],        'NetOutSpeed2'=>$S->NetWork['OutSpeed'][2],        'NetOutSpeed3'=>$S->NetWork['OutSpeed'][3],        'NetOutSpeed4'=>$S->NetWork['OutSpeed'][4],        'NetOutSpeed5'=>$S->NetWork['OutSpeed'][5],        'NetInputSpeed2'=>$S->NetWork['InputSpeed'][2],        'NetInputSpeed3'=>$S->NetWork['InputSpeed'][3],        'NetInputSpeed4'=>$S->NetWork['InputSpeed'][4],        'NetInputSpeed5'=>$S->NetWork['InputSpeed'][5]
        );    $jarr=json_encode($arr);    $_GET['callback'] = htmlspecialchars($_GET['callback']);    echo $_GET['callback'],'(',$jarr,')';    exit;
}function memory_usage() {
    $memory  = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';    return $memory;
}// 计时function microtime_float() {
    $mtime = microtime();    $mtime = explode(' ', $mtime);    return $mtime[1] + $mtime[0];
}?>nbsp;html><title>=$title?></title><meta><meta><style><!--* {font-family: "Microsoft Yahei",Tahoma, Arial; }body{text-align: center; margin: 0 auto; padding: 0; background-color:#fafafa;font-size:12px;font-family:Tahoma, Arial}h1 {font-size: 26px; padding: 0; margin: 0; color: #333333; font-family: "Lucida Sans Unicode","Lucida Grande",sans-serif;}h1 small {font-size: 11px; font-family: Tahoma; font-weight: bold; }a{color: #666; text-decoration:none;}a.black{color: #000000; text-decoration:none;}.w_logo{height:25px;text-align:center;color:#333;font-size: 15px; width:13%; }.j_top{display:table;font-weight:bold;background:#dedede;color:#626262;width: 100%;text-align: left; height: 25px; line-height: 25px;box-shadow: 1px 1px 1px #CCC;-moz-box-shadow: 1px 1px 1px #CCC;-webkit-box-shadow: 1px 1px 1px #CCC;-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=2, Direction=135, Color=&#39;#CCCCCC&#39;)";}.j_top a{text-align:center; width:8.7%; display: table-cell; padding: 5px 0px;}.j_top a:hover{background:#dadada;}.con{width: 90%;margin: 10px auto;}.con .j_top{ padding: 0px 10px;}.j_tb{display:table;width:100%;padding:5px 10px;border-bottom:1px solid #CCCCCC;text-align:left;}.j_td{display:table-cell;}.j_td_t{width:120px;}.j_td_c{width:50%;}.j_td_t1{width:320px;}.w_foot{height:25px;text-align:center; background:#dedede;}input{padding: 2px; background: #FFFFFF; border-top:1px solid #666666; border-left:1px solid #666666; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC; font-size:12px}input.btn{font-weight: bold; height: 20px; line-height: 20px; padding: 0 6px; color:#666666; background: #f2f2f2; border:1px solid #999;font-size:12px}.bar {border:1px solid #999999; background:#FFFFFF; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px; overflow: hidden;}.bar_1 {border:1px dotted #999999; background:#FFFFFF; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px; overflow: hidden;}.barli_red{background:#ff6600; height:5px; margin:0px; padding:0;}.barli_blue{background:#0099FF; height:5px; margin:0px; padding:0;}.barli_green{background:#36b52a; height:5px; margin:0px; padding:0;}.barli_black{background:#333; height:5px; margin:0px; padding:0;}.barli_1{background:#999999; height:5px; margin:0px; padding:0;}.barli{background:#36b52a; height:5px; margin:0px; padding:0;}#page {width: 100%; padding: 0 auto; margin: 0 auto; text-align: left;}#header{position:relative; padding:5px;}--></style><script></script><script>$(document).ready(function(){getJSONData();});var OutSpeed2=<?=floor($S->NetWork[&#39;OutSpeed&#39;][2]);?>;var OutSpeed3=<?=floor($S->NetWork[&#39;OutSpeed&#39;][3]);?>;var OutSpeed4=<?=floor($S->NetWork[&#39;OutSpeed&#39;][4]);?>;var OutSpeed5=<?=floor($S->NetWork[&#39;OutSpeed&#39;][5]);?>;var InputSpeed2=<?=floor($S->NetWork[&#39;InputSpeed&#39;][2]);?>;var InputSpeed3=<?=floor($S->NetWork[&#39;InputSpeed&#39;][3]);?>;var InputSpeed4=<?=floor($S->NetWork[&#39;InputSpeed&#39;][4]);?>;var InputSpeed5=<?=floor($S->NetWork[&#39;InputSpeed&#39;][5]);?>;function getJSONData(){
    setTimeout("getJSONData()", 1000);
    $.getJSON(&#39;?act=rt&callback=?&#39;, displayData);
}function ForDight(Dight,How){
  if (Dight<0){    var Last=0+"B/s";
  }else if (Dight<1024){    var Last=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"B/s";
  }else if (Dight<1048576){
    Dight=Dight/1024;    var Last=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"K/s";
  }else{
    Dight=Dight/1048576;    var Last=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"M/s";
  }    return Last;
}function displayData(dataJSON){
    $("#useSpace").html(dataJSON.useSpace);
    $("#freeSpace").html(dataJSON.freeSpace);
    $("#hdPercent").html(dataJSON.hdPercent);
    $("#barhdPercent").width(dataJSON.barhdPercent);
    $("#TotalMemory").html(dataJSON.TotalMemory);
    $("#UsedMemory").html(dataJSON.UsedMemory);
    $("#FreeMemory").html(dataJSON.FreeMemory);
    $("#CachedMemory").html(dataJSON.CachedMemory);
    $("#Buffers").html(dataJSON.Buffers);
    $("#TotalSwap").html(dataJSON.TotalSwap);
    $("#swapUsed").html(dataJSON.swapUsed);
    $("#swapFree").html(dataJSON.swapFree);
    $("#swapPercent").html(dataJSON.swapPercent);
    $("#loadAvg").html(dataJSON.loadAvg);
    $("#uptime").html(dataJSON.uptime);
    $("#freetime").html(dataJSON.freetime);
    $("#stime").html(dataJSON.stime);
    $("#bjtime").html(dataJSON.bjtime);
    $("#cpuuse").html(dataJSON.cpuuse);
    $("#memRealUsed").html(dataJSON.memRealUsed);
    $("#memRealFree").html(dataJSON.memRealFree);
    $("#memRealPercent").html(dataJSON.memRealPercent);
    $("#memPercent").html(dataJSON.memPercent);
    $("#barmemPercent").width(dataJSON.memPercent);
    $("#barmemRealPercent").width(dataJSON.barmemRealPercent);
    $("#memCachedPercent").html(dataJSON.memCachedPercent);
    $("#barmemCachedPercent").width(dataJSON.barmemCachedPercent);
    $("#barswapPercent").width(dataJSON.barswapPercent);
    $("#NetOut2").html(dataJSON.NetOut2);
    $("#NetOut3").html(dataJSON.NetOut3);
    $("#NetOut4").html(dataJSON.NetOut4);
    $("#NetOut5").html(dataJSON.NetOut5);
    $("#NetOut6").html(dataJSON.NetOut6);
    $("#NetOut7").html(dataJSON.NetOut7);
    $("#NetOut8").html(dataJSON.NetOut8);
    $("#NetOut9").html(dataJSON.NetOut9);
    $("#NetOut10").html(dataJSON.NetOut10);
    $("#NetInput2").html(dataJSON.NetInput2);
    $("#NetInput3").html(dataJSON.NetInput3);
    $("#NetInput4").html(dataJSON.NetInput4);
    $("#NetInput5").html(dataJSON.NetInput5);
    $("#NetInput6").html(dataJSON.NetInput6);
    $("#NetInput7").html(dataJSON.NetInput7);
    $("#NetInput8").html(dataJSON.NetInput8);
    $("#NetInput9").html(dataJSON.NetInput9);
    $("#NetInput10").html(dataJSON.NetInput10);
    $("#NetOutSpeed2").html(ForDight((dataJSON.NetOutSpeed2-OutSpeed2),3)); OutSpeed2=dataJSON.NetOutSpeed2;
    $("#NetOutSpeed3").html(ForDight((dataJSON.NetOutSpeed3-OutSpeed3),3)); OutSpeed3=dataJSON.NetOutSpeed3;
    $("#NetOutSpeed4").html(ForDight((dataJSON.NetOutSpeed4-OutSpeed4),3)); OutSpeed4=dataJSON.NetOutSpeed4;
    $("#NetOutSpeed5").html(ForDight((dataJSON.NetOutSpeed5-OutSpeed5),3)); OutSpeed5=dataJSON.NetOutSpeed5;
    $("#NetInputSpeed2").html(ForDight((dataJSON.NetInputSpeed2-InputSpeed2),3));   InputSpeed2=dataJSON.NetInputSpeed2;
    $("#NetInputSpeed3").html(ForDight((dataJSON.NetInputSpeed3-InputSpeed3),3));   InputSpeed3=dataJSON.NetInputSpeed3;
    $("#NetInputSpeed4").html(ForDight((dataJSON.NetInputSpeed4-InputSpeed4),3));   InputSpeed4=dataJSON.NetInputSpeed4;
    $("#NetInputSpeed5").html(ForDight((dataJSON.NetInputSpeed5-InputSpeed5),3));   InputSpeed5=dataJSON.NetInputSpeed5;
}</script><a></a><p>
    </p><p><a>PHP参数</a>
        <a>组件支持</a>
        <a>第三方组件</a>
        <a>数据库支持</a>
        <a>性能检测</a>
        <a>网速检测</a>
        <a>MySQL检测</a>
        <a>函数检测</a>
        <a>邮件检测</a>
    </p>
    <!--Server info-->
    <p>
        </p><p>服务器参数</p>
        <p><label>服务器域名/IP地址</label><label>=$S->S['DomainIP'];?></label></p>
        <p><label>服务器标识</label><label>=$S->S['Flag'];?></label></p>
        <p>
            </p><p><label>服务器操作系统</label><label>=$S->S['OS'];?></label></p>
            <p><label>服务器解译引擎</label><label>=$S->S['WebEngine'];?></label></p>
        
        <p>
            </p><p><label>服务器语言</label><label>=$S->S['Language'];?></label></p>
            <p><label>服务器端口</label><label>=$S->S['WebPort'];?></label></p>
        
        <p>
            </p><p><label>服务器主机名</label><label>=$S->S['Name'];?></label></p>
            <p><label>绝对路径</label><label>=$S->S['WebPath'];?></label></p>
        
        <p>
            </p><p><label>管理员邮箱</label><label>=$S->S['Email'];?></label></p>
            <p><label>探针路径</label><label>=$S->S['ProbePath'];?></label></p>
        
    
    <!--Server Real-Time-->
    <p>
        </p><p>服务器实时数据</p>
        <p>
            </p><p><label>服务器当前时间</label><label>=$S->S['sTime'];?></label></p>
            <p><label>服务器已运行时间</label><label>=$S->sysInfo['uptime'];?></label></p>
        
        <p><label>CPU型号[=$S->sysInfo['cpu']['num'];?>核]</label><label>=$S->sysInfo['cpu']['model'];?></label></p>
        <p><label>CPU使用情况</label><label>=$S->CPU_Use;?></label></p>
        <p><label>硬盘使用状况</label>
            <label>总空间 =$S->hd['t'];?> G,已用 <font><span>=$S->hd['u'];?></span></font> G,
                空闲 <font><span>=$S->hd['f'];?></span></font> G,
                使用率 <span>=$S->hd['PCT'];?></span>%                <p></p>
<p>hd['PCT']?>%" > </p> </label></p>
            
        
        <p><label>内存使用状况</label>
            <label>物理内存:共<font>=$S->sysInfo['memTotal'];?> </font>
                , 已用<font><span>=$S->sysInfo['memUsed']?></span></font>
                , 空闲<font><span>=$S->sysInfo['memFree'];?></span></font>
                , 使用率<span>=$S->sysInfo['memPercent'];?></span>
                <p></p>
<p>sysInfo['memPercent'];?>%" > </p></label></p>
            <?php  if($S->sysInfo['memCached']){ ?>
                Cache化内存为 <span>=$S->sysInfo['memCached'];?></span>
                , 使用率<span>=$S->sysInfo['memCachedPercent'];?></span>% |
                Buffers缓冲为  <span>=$S->sysInfo['memBuffers'];?></span>
                <p></p><p>sysInfo['memCachedPercent'];?>%" > </p>
                真实内存使用<span>=$S->sysInfo['memRealUsed'];?></span>
                , 真实内存空闲<span>=$S->sysInfo['memRealFree'];?></span>
                , 使用率<span>=$S->sysInfo['memRealPercent'];?></span>%                <p></p><p>sysInfo['memRealPercent'];?>%" > </p>
            <?php  } ?>
            <?php  if($S->sysInfo['swapTotal']){ ?>
                SWAP区:共=$S->sysInfo['swapTotal'];?>
                , 已使用<span>=$S->sysInfo['swapUsed'];?></span>
                , 空闲<span>=$S->sysInfo['swapFree'];?></span>
                , 使用率<span>=$S->sysInfo['swapPercent'];?></span>%                <p></p><p>sysInfo['swapPercent'];?>%" > </p> 
            <?php  } ?>
            
        
        <p><label>系统平均负载</label><label>=$S->sysInfo['loadAvg']?></label></p>
    
    <!--net work-->
    <p>
        </p><p>网络使用状况</p>
        <?php             $netnum = count($S->NetWork);            for ($i=2; $i 
                <p>
                    <label>=$S->NetWork['NetWorkName'][$i]?></label>
                    <label>入网:<font><span>">=$S->NetWork['NetInput'][$i];?></span></font></label>
                    <label>实时:<font><span>">0B/s</span></font></label>
                    <label>出网: <font><span>">=$S->NetWork['NetOut'][$i];?></span></font></label>
                    <label>实时: <font><span>">0B/s</span></font></label>
                </p>
        <?php  } ?>
    
    <!--enbale module-->
    <p>
        </p><p>PHP已编译模块检测</p>
        <p><label>=$S->phpexts();?></label></p>
    
    <!--enbale module-->
    <a></a>
    <p>
        </p><p>PHP相关参数</p>
        <p>
            </p><p><label>PHP信息(phpinfo):</label><label>=$disFuns;?></label></p>
            <p><label>PHP版本(php_version):</label><label>=PHP_VERSION;?></label></p>
        
        <p>
            </p><p><label>PHP运行方式:</label><label>=strtoupper(php_sapi_name());?></label></p>
            <p><label>脚本占用最大内存(memory_limit):</label><label>=$S::show("memory_limit");?></label></p>
        
        <p>
            </p><p><label>PHP安全模式(safe_mode):</label><label>=$S::show("safe_mode");?></label></p>
            <p><label>POST方法提交最大限制(post_max_size):</label><label>=$S::show("post_max_size");?></label></p>
        
        <p>
            </p><p><label>上传文件最大限制(upload_max_filesize):</label><label>=$S::show("upload_max_filesize");?></label></p>
            <p><label>浮点型数据显示的有效位数(precision):</label><label>=$S::show("precision");?></label></p>
        
        <p>
            </p><p><label>脚本超时时间(max_execution_time):</label><label>=$S::show("max_execution_time");?>秒</label></p>
            <p><label>socket超时时间(default_socket_timeout):</label><label>=$S::show("default_socket_timeout");?>秒</label></p>
        
        <p>
            </p><p><label>PHP页面根目录(doc_root):</label><label>=$S::show("doc_root");?></label></p>
            <p><label>用户根目录(user_dir):</label><label>=$S::show("user_dir");?></label></p>
        
        <p>
            </p><p><label>dl()函数(enable_dl):</label><label>=$S::show("enable_dl");?></label></p>
            <p><label>指定包含文件目录(include_path):</label><label>=$S::show("include_path");?></label></p>
        
        <p>
            </p><p><label>显示错误信息(display_errors):</label><label>=$S::show("display_errors");?></label></p>
            <p><label>自定义全局变量(register_globals):</label><label>=$S::show("register_globals");?></label></p>
        
        <p>
            </p><p><label>数据反斜杠转义(magic_quotes_gpc):</label><label>=$S::show("magic_quotes_gpc");?></label></p>
            <p><label>"<?...?>"短标签(short_open_tag):</label><label>=$S::show("short_open_tag");?></label></p>
        
        <p>
            </p><p><label>"<% %>"ASP风格标记(asp_tags):</label><label>=$S::show("asp_tags");?></label></p>
            <p><label>忽略重复错误信息(ignore_repeated_errors):</label><label>=$S::show("ignore_repeated_errors");?></label></p>
        
        <p>
            </p><p><label>忽略重复的错误源(ignore_repeated_source):</label><label>=$S::show("ignore_repeated_source");?></label></p>
            <p><label>报告内存泄漏(report_memleaks):</label><label>=$S::show("report_memleaks");?></label></p>
        
        <p>
            </p><p><label>自动字符串转义(magic_quotes_gpc):</label><label>=$S::show("magic_quotes_gpc");?></label></p>
            <p><label>外部字符串自动转义(magic_quotes_runtime):</label><label>=$S::show("magic_quotes_runtime");?></label></p>
        
        <p>
            </p><p><label>打开远程文件(allow_url_fopen):</label><label>=$S::show("allow_url_fopen");?></label></p>
            <p><label>声明argv和argc变量(register_argc_argv):</label><label>=$S::show("register_argc_argv");?></label></p>
        
        <p>
            </p><p><label>Cookie 支持:</label><label>=$strcookies;?></label></p>
            <p><label>拼写检查(ASpell Library):</label><label>=$S::isfun("aspell_check_raw");?></label></p>
        
        <p>
            </p><p><label>高精度数学运算(BCMath):</label><label>=$S::isfun("bcadd");?></label></p>
            <p><label>PREL相容语法(PCRE):</label><label>=$S::isfun("preg_match");?></label></p>
        
        <p>
            </p><p><label>PDF文档支持:</label><label>=$S::isfun("pdf_close");?></label></p>
            <p><label>SNMP网络管理协议:</label><label>=$S::isfun("snmpget");?></label></p>
        
        <p>
            </p><p><label>VMailMgr邮件处理:</label><label>=$S::isfun("vm_adduser");?></label></p>
            <p><label>Curl支持:</label><label>=$S::isfun("curl_init");?></label></p>
        
        <p>
            </p><p><label>SMTP支持:</label><label>=$strsmtp;?></label></p>
            <p><label>SMTP地址:</label><label>=$smtpadd;?></label></p>
        
        <p>
            <label>默认支持函数(enable_functions):</label><label><a>?act=Function' target='_blank' class='static'>请点这里查看详细!</a></label>
        </p>
        <p>
            </p><p><label>被禁用的函数(disable_functions):</label><label>=$S::GetDisFuns();?></label></p>
        
    
    <!--组件支持-->
    <a></a>
    <p>
        </p><p>组件支持</p>
        <p>
            </p><p><label>FTP支持:</label><label>=$S::isfun("ftp_login");?></label></p>
            <p><label>XML解析支持:</label><label>=$S::isfun("xml_set_object");?></label></p>
        
        <p>
            </p><p><label>Session支持:</label><label>=$S::isfun("session_start");?></label></p>
            <p><label>Socket支持:</label><label>=$S::isfun("socket_accept");?></label></p>
        
        <p>
            </p><p><label>Calendar支持</label><label>=$S::isfun('cal_days_in_month');?></label></p>
            <p><label>允许URL打开文件:</label><label>=$S::show("allow_url_fopen");?></label></p>
        
        <p>
            </p><p><label>GD库支持:</label><label>=$S::GetGDVer();?></label></p>
            <p><label>压缩文件支持(Zlib):</label><label>=$S::isfun("gzclose");?></label></p>
        
        <p>
            </p><p><label>IMAP电子邮件系统函数库:</label><label>=$S::isfun("imap_close");?></label></p>
            <p><label>历法运算函数库:</label><label>=$S::isfun("JDToGregorian");?></label></p>
        
        <p>
            </p><p><label>正则表达式函数库:</label><label>=$S::isfun("preg_match");?></label></p>
            <p><label>WDDX支持:</label><label>=$S::isfun("wddx_add_vars");?></label></p>
        
        <p>
            </p><p><label>Iconv编码转换:</label><label>=$S::isfun("iconv");?></label></p>
            <p><label>mbstring:</label><label>=$S::isfun("mb_eregi");?></label></p>
        
        <p>
            </p><p><label>高精度数学运算:</label><label>=$S::isfun("bcadd");?></label></p>
            <p><label>LDAP目录协议:</label><label>=$S::isfun("ldap_close");?></label></p>
        
        <p>
            </p><p><label>MCrypt加密处理:</label><label>=$S::isfun("mcrypt_cbc");?></label></p>
            <p><label>哈稀计算:</label><label>=$S::isfun("mhash_count");?></label></p>
        
    
    <a></a>
    <!--第三方组件信息-->
    <p>
        </p><p>第三方组件</p>
        <p>$zendInfo = $S::GetZendInfo();?>
            </p><p><label>Zend版本</label><label>=$zendInfo['ver'];?></label></p>
            <p><label>=$zendInfo['loader']?></label><label>=$zendInfo['html'];?></label></p>
        
        <p>
            </p><p><label>eAccelerator</label><label>=$S->CHKModule('eAccelerator');?></label></p>
            <p><label>ioncube</label><label>=$S->GetIconcube();?></label></p>
        
        <p>
            </p><p><label>XCache</label><label>=$S->CHKModule('XCache');?></label></p>
            <p><label>APC</label><label>=$S->CHKModule('APC');?></label></p>
        
    
    <a></a>
    <!--db-->
    <p>
        </p><p>数据库支持</p>
        <p>
            </p><p><label>MySQL 数据库:</label><label>=$S::isfun('mysql_close').$S::GetDBVer('mysql');?></label></p>
            <p><label>ODBC 数据库:</label><label>=$S::isfun("odbc_close");?></label></p>
        
        <p>
            </p><p><label>Oracle 数据库:</label><label>=$S::isfun("ora_close");?></label></p>
            <p><label>SQL Server 数据库:</label><label>$S::isfun("mssql_close");?></label></p>
        
        <p>
            </p><p><label>dBASE 数据库:</label><label>=$S::isfun("dbase_close");?></label></p>
            <p><label>mSQL 数据库:</label><label>=$S::isfun("msql_close");?></label></p>
        
        <p>
            </p><p><label>SQLite 数据库:</label><label>=$S->GetDBVer('sqlite');?></label></p>
            <p><label>Hyperwave 数据库:</label><label>=$S::isfun("hw_close");?></label></p>
        
        <p>
            </p><p><label>Postgre SQL 数据库:</label><label>=$S::isfun("pg_close"); ?></label></p>
            <p><label>Informix 数据库:</label><label>=$S::isfun("ifx_close");?></label></p>
        
        <p>
            </p><p><label>DBA 数据库:</label><label>=$S::isfun("dba_close");?></label></p>
            <p><label>DBM 数据库:</label><label>=$S::isfun("dbmclose");?></label></p>
        
        <p>
            </p><p><label>FilePro 数据库:</label><label>=$S::isfun("filepro_fieldcount");?></label></p>
            <p><label>SyBase 数据库:</label><label>=$S::isfun("sybase_close");?></label></p>
        
    

    <p>
        </p><p><?php  $run_time = sprintf(&#39;%0.4f&#39;, microtime_float() - $time_start);?>Processed in <?php  echo $run_time?> seconds. <?php  echo memory_usage();?> memory usage.</p>
    

               

<?phperror_reporting (0); //抑制所有错误信息@header("content-Type: text/html; charset=utf-8"); //语言强制ob_start();
date_default_timezone_set(&#39;Asia/Shanghai&#39;);//此句用于消除时间差$time_start = microtime_float();/**
*
*/class ServerInfo{
    //服务器参数
    public $S = array(        &#39;YourIP&#39;, //你的IP
        &#39;DomainIP&#39;, //服务器域名和IP及进程用户名
        &#39;Flag&#39;, //服务器标识
        &#39;OS&#39;, //服务器操作系统具体
        &#39;Language&#39;, //服务器语言
        &#39;Name&#39;, //服务器主机名
        &#39;Email&#39;, //服务器管理员邮箱
        &#39;WebEngine&#39;, //服务器WEB服务引擎
        &#39;WebPort&#39;, //web服务端口
        &#39;WebPath&#39;, //web路径
        &#39;ProbePath&#39;, //本脚本所在路径
        &#39;sTime&#39; //服务器时间
        );    public $sysInfo; //系统信息,windows和linux
    public $CPU_Use;    public $hd = array(        &#39;t&#39;, //硬盘总量
        &#39;f&#39;, //可用
        &#39;u&#39;, //已用
        &#39;PCT&#39;, //使用率
        );    public $NetWork = array(        &#39;NetWorkName&#39;, //网卡名称
        &#39;NetOut&#39;, //出网总量
        &#39;NetInput&#39;, //入网总量
        &#39;OutSpeed&#39;, //出网速度
        &#39;InputSpeed&#39; //入网速度
        ); //网卡流量

    function __construct(){
        $this->S['YourIP'] = @$_SERVER['REMOTE_ADDR'];        $domain = $this->OS()?$_SERVER['SERVER_ADDR']:@gethostbyname($_SERVER['SERVER_NAME']);        $this->S['DomainIP'] = @get_current_user().' - '.$_SERVER['SERVER_NAME'].'('.$domain.')';        $this->S['Flag'] = empty($this->sysInfo['win_n'])?@php_uname():$this->sysInfo['win_n'];        $os = explode(" ", php_uname());        $oskernel = $this->OS()?$os[2]:$os[1];        $this->S['OS'] = $os[0].'内核版本:'.$oskernel;        $this->S['Language'] = getenv("HTTP_ACCEPT_LANGUAGE");        $this->S['Name'] = $this->OS()?$os[1]:$os[2];        $this->S['Email'] = $_SERVER['SERVER_ADMIN'];        $this->S['WebEngine'] = $_SERVER['SERVER_SOFTWARE'];        $this->S['WebPort'] = $_SERVER['SERVER_PORT'];        $this->S['WebPath'] = $_SERVER['DOCUMENT_ROOT']?str_replace('\\','/',$_SERVER['DOCUMENT_ROOT']):str_replace('\\','/',dirname(__FILE__));        $this->S['ProbePath'] = str_replace('\\','/',__FILE__)?str_replace('\\','/',__FILE__):$_SERVER['SCRIPT_FILENAME'];        $this->S['sTime'] = date('Y-m-d H:i:s');        $this->sysInfo = $this->GetsysInfo();        //var_dump($this->sysInfo);

        $CPU1 = $this->GetCPUUse();
        sleep(1);        $CPU2 = $this->GetCPUUse();        $data = $this->GetCPUPercent($CPU1, $CPU2);        $this->CPU_Use =$data['cpu0']['user']."%us,  ".$data['cpu0']['sys']."%sy,  ".$data['cpu0']['nice']."%ni, ".$data['cpu0']['idle']."%id,  ".$data['cpu0']['iowait']."%wa,  ".$data['cpu0']['irq']."%irq,  ".$data['cpu0']['softirq']."%softirq";        if(!$this->OS()) $this->CPU_Use = '目前只支持Linux系统';        $this->hd = $this->GetDisk();        $this->NetWork = $this->GetNetWork();
    }    public function OS(){
        return DIRECTORY_SEPARATOR=='/'?true:false;
    }    public function GetsysInfo(){
        switch (PHP_OS) {            case 'Linux':                $sysInfo = $this->sys_linux();                break;            case 'FreeBSD':                $sysInfo = $this->sys_freebsd();                break;            default:                # code...
                break;
        }        return $sysInfo;
    }    public function sys_linux(){ //linux系统探测
        $str = @file("/proc/cpuinfo"); //获取CPU信息
        if(!$str) return false;        $str = implode("", $str);
        @preg_match_all("/model\s+name\s{0,}\:+\s{0,}([\w\s\)\@.-]+)([\r\n]+)/s", $str, $model); //CPU 名称
        @preg_match_all("/cpu\s+MHz\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $mhz); //CPU频率
        @preg_match_all("/cache\s+size\s{0,}\:+\s{0,}([\d\.]+\s{0,}[A-Z]+[\r\n]+)/", $str, $cache); //CPU缓存
        @preg_match_all("/bogomips\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $bogomips); //
        if(is_array($model[1])){            $cpunum = count($model[1]);            $x1 = $cpunum>1?' ×'.$cpunum:'';            $mhz[1][0] = ' | 频率:'.$mhz[1][0];            $cache[1][0] = ' | 二级缓存:'.$cache[1][0];            $bogomips[1][0] = ' | Bogomips:'.$bogomips[1][0];            $res['cpu']['num'] = $cpunum;            $res['cpu']['model'][] = $model[1][0].$mhz[1][0].$cache[1][0].$bogomips[1][0].$x1;            if(is_array($res['cpu']['model'])) $res['cpu']['model'] = implode("<br>", $res['cpu']['model']);            if(is_array($res['cpu']['mhz'])) $res['cpu']['mhz'] = implode("<br>", $res['cpu']['mhz']);            if(is_array($res['cpu']['cache'])) $res['cpu']['cache'] = implode("<br>", $res['cpu']['cache']);            if(is_array($res['cpu']['bogomips'])) $res['cpu']['bogomips'] = implode("<br>", $res['cpu']['bogomips']);
        }        //服务器运行时间
        $str = @file("/proc/uptime");        if(!$str) return false;        $str = explode(" ", implode("", $str));        $str = trim($str[0]);        $min = $str/60;        $hours = $min/60;        $days = floor($hours/24);        $hours = floor($hours-($days*24));        $min = floor($min-($days*60*24)-($hours*60));        $res['uptime'] = $days."天".$hours."小时".$min."分钟";        //内存
        $str = @file("/proc/meminfo");        if(!$str) return false;        $str = implode("", $str);
        preg_match_all("/MemTotal\s{0,}\:+\s{0,}([\d\.]+).+?MemFree\s{0,}\:+\s{0,}([\d\.]+).+?Cached\s{0,}\:+\s{0,}([\d\.]+).+?SwapTotal\s{0,}\:+\s{0,}([\d\.]+).+?SwapFree\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buf);
        preg_match_all("/Buffers\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buffers);        $resmem['memTotal'] = round($buf[1][0]/1024, 2);        $resmem['memFree'] = round($buf[2][0]/1024, 2);        $resmem['memBuffers'] = round($buffers[1][0]/1024, 2);        $resmem['memCached'] = round($buf[3][0]/1024, 2);        $resmem['memUsed'] = $resmem['memTotal']-$resmem['memFree'];        $resmem['memPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memUsed']/$resmem['memTotal']*100,2):0;        $resmem['memRealUsed'] = $resmem['memTotal'] - $resmem['memFree'] - $resmem['memCached'] - $resmem['memBuffers']; //真实内存使用
        $resmem['memRealFree'] = $resmem['memTotal'] - $resmem['memRealUsed']; //真实空闲
        $resmem['memRealPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memRealUsed']/$resmem['memTotal']*100,2):0; //真实内存使用率
        $resmem['memCachedPercent'] = (floatval($resmem['memCached'])!=0)?round($resmem['memCached']/$resmem['memTotal']*100,2):0; //Cached内存使用率
        $resmem['swapTotal'] = round($buf[4][0]/1024, 2);        $resmem['swapFree'] = round($buf[5][0]/1024, 2);        $resmem['swapUsed'] = round($resmem['swapTotal']-$resmem['swapFree'], 2);        $resmem['swapPercent'] = (floatval($resmem['swapTotal'])!=0)?round($resmem['swapUsed']/$resmem['swapTotal']*100,2):0;        $resmem = $this->formatmem($resmem); //格式化内存显示单位
        $res = array_merge($res,$resmem);        // LOAD AVG 系统负载
        $str = @file("/proc/loadavg");        if (!$str) return false;        $str = explode(" ", implode("", $str));        $str = array_chunk($str, 4);        $res['loadAvg'] = implode(" ", $str[0]);        return $res;
    }    public function sys_freebsd(){ //freeBSD系统探测
        $res['cpu']['num']   = do_command('sysctl','hw.ncpu'); //CPU
        $res['cpu']['model'] = do_command('sysctl','hw.model');        $res['loadAvg']      = do_command('sysctl','vm.loadavg'); //Load AVG  系统负载
        //uptime
        $buf = do_command('sysctl','kern.boottime');        $buf = explode(' ', $buf);        $sys_ticks = time()-intval($buf[3]);        $min = $sys_ticks/60;        $hours = $min/60;        $days = floor($hours/24);        $hours = floor($hours-($days*24));        $min = floor($min-($days*60*24)-($hours*60));        $res['uptime'] = $days.'天'.$hours.'小时'.$min.'分钟';        //内存
        $buf = do_command('sysctl','hw.physmem');        $resmem['memTotal'] = round($buf/1024/1024, 2);        $str = do_command('sysctl','vm.vmtotal');
        preg_match_all("/\nVirtual Memory[\:\s]*\(Total[\:\s]*([\d]+)K[\,\s]*Active[\:\s]*([\d]+)K\@.-]+)([\r\n]+)/s", $str, $model); //CPU 名称         @preg_match_all("/cpu\s+MHz\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $mhz); //CPU频率         @preg_match_all("/cache\s+size\s{0,}\:+\s{0,}([\d\.]+\s{0,}[A-Z]+[\r\n]+)/", $str, $cache); //CPU缓存         @preg_match_all("/bogomips\s{0,}\:+\s{0,}([\d\.]+)[\r\n]+/", $str, $bogomips); //         if(is_array($model[1])){             $cpunum = count($model[1]);             $x1 = $cpunum>1?' ×'.$cpunum:'';             $mhz[1][0] = ' | 频率:'.$mhz[1][0];             $cache[1][0] = ' | 二级缓存:'.$cache[1][0];             $bogomips[1][0] = ' | Bogomips:'.$bogomips[1][0];             $res['cpu']['num'] = $cpunum;             $res['cpu']['model'][] = $model[1][0].$mhz[1][0].$cache[1][0].$bogomips[1][0].$x1;             if(is_array($res['cpu']['model'])) $res['cpu']['model'] = implode("<br>", $res['cpu']['model']);             if(is_array($res['cpu']['mhz'])) $res['cpu']['mhz'] = implode("<br>", $res['cpu']['mhz']);             if(is_array($res['cpu']['cache'])) $res['cpu']['cache'] = implode("<br>", $res['cpu']['cache']);             if(is_array($res['cpu']['bogomips'])) $res['cpu']['bogomips'] = implode("<br>", $res['cpu']['bogomips']);         }         //服务器运行时间         $str = @file("/proc/uptime");         if(!$str) return false;         $str = explode(" ", implode("", $str));         $str = trim($str[0]);         $min = $str/60;         $hours = $min/60;         $days = floor($hours/24);         $hours = floor($hours-($days*24));         $min = floor($min-($days*60*24)-($hours*60));         $res['uptime'] = $days."天".$hours."小时".$min."分钟";         //内存         $str = @file("/proc/meminfo");         if(!$str) return false;         $str = implode("", $str);         preg_match_all("/MemTotal\s{0,}\:+\s{0,}([\d\.]+).+?MemFree\s{0,}\:+\s{0,}([\d\.]+).+?Cached\s{0,}\:+\s{0,}([\d\.]+).+?SwapTotal\s{0,}\:+\s{0,}([\d\.]+).+?SwapFree\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buf);         preg_match_all("/Buffers\s{0,}\:+\s{0,}([\d\.]+)/s", $str, $buffers);         $resmem['memTotal'] = round($buf[1][0]/1024, 2);         $resmem['memFree'] = round($buf[2][0]/1024, 2);         $resmem['memBuffers'] = round($buffers[1][0]/1024, 2);         $resmem['memCached'] = round($buf[3][0]/1024, 2);         $resmem['memUsed'] = $resmem['memTotal']-$resmem['memFree'];         $resmem['memPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memUsed']/$resmem['memTotal']*100,2):0;         $resmem['memRealUsed'] = $resmem['memTotal'] - $resmem['memFree'] - $resmem['memCached'] - $resmem['memBuffers']; //真实内存使用         $resmem['memRealFree'] = $resmem['memTotal'] - $resmem['memRealUsed']; //真实空闲         $resmem['memRealPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memRealUsed']/$resmem['memTotal']*100,2):0; //真实内存使用率         $resmem['memCachedPercent'] = (floatval($resmem['memCached'])!=0)?round($resmem['memCached']/$resmem['memTotal']*100,2):0; //Cached内存使用率         $resmem['swapTotal'] = round($buf[4][0]/1024, 2);         $resmem['swapFree'] = round($buf[5][0]/1024, 2);         $resmem['swapUsed'] = round($resmem['swapTotal']-$resmem['swapFree'], 2);         $resmem['swapPercent'] = (floatval($resmem['swapTotal'])!=0)?round($resmem['swapUsed']/$resmem['swapTotal']*100,2):0;         $resmem = $this->formatmem($resmem); //格式化内存显示单位         $res = array_merge($res,$resmem);         // LOAD AVG 系统负载         $str = @file("/proc/loadavg");         if (!$str) return false;         $str = explode(" ", implode("", $str));         $str = array_chunk($str, 4);         $res['loadAvg'] = implode(" ", $str[0]);         return $res;     }     public function sys_freebsd(){ //freeBSD系统探测         $res['cpu']['num']   = do_command('sysctl','hw.ncpu'); //CPU         $res['cpu']['model'] = do_command('sysctl','hw.model');         $res['loadAvg']      = do_command('sysctl','vm.loadavg'); //Load AVG  系统负载         //uptime         $buf = do_command('sysctl','kern.boottime');         $buf = explode(' ', $buf);         $sys_ticks = time()-intval($buf[3]);         $min = $sys_ticks/60;         $hours = $min/60;         $days = floor($hours/24);         $hours = floor($hours-($days*24));         $min = floor($min-($days*60*24)-($hours*60));         $res['uptime'] = $days.'天'.$hours.'小时'.$min.'分钟';         //内存         $buf = do_command('sysctl','hw.physmem');         $resmem['memTotal'] = round($buf/1024/1024, 2);         $str = do_command('sysctl','vm.vmtotal');         preg_match_all("/\nVirtual Memory[\:\s]*\(Total[\:\s]*([\d]+)K[\,\s]*Active[\:\s]*([\d]+)K\n/i", $str, $buff, PREG_SET_ORDER);
        preg_match_all("/\nReal Memory[\:\s]*Total[\s]∗([\d]+)K[\s]∗Active[\s]∗([\d]+)KTotal[\s]∗([\d]+)K[\s]∗Active[\s]∗([\d]+)K\n/i", $str, $buf, PREG_SET_ORDER);        $resmem['memRealUsed'] = round($buf[0][2]/1024, 2);        $resmem['memCached'] = round($buff[0][2]/1024, 2);        $resmem['memUsed'] = round($buf[0][1]/1024, 2)+$resmem['memCached'];        $resmem['memFree'] = $resmem['memTotal']-$resmem['memUsed'];        $resmem['memPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memUsed']/$resmem['memTotal']*100,2):0;        $resmem['memRealPercent'] = (floatval($resmem['memTotal'])!=0)?round($resmem['memRealUsed']/$resmem['memTotal']*100,2):0;        $resmem = $this->formatmem($resmem);        $res = array_merge($res,$resmem);        return $res;
    }    public function do_command($cName, $args){ //执行系统命令FreeBSD
        $cName = empty($cName)?'sysctl':timr($cName);        if(empty($args)) return false;        $args = '-n '.$args;        $buffers = '';        $command = find_command($cName);        if(!$command) return false;        if($fp = @popen("$command $args", 'r')){            while (!@feof($fp)) {                $buffers .= @fgets($fp, 4096);
            }
            pclose($fp);            return trim($buffers);
        }        return false;
    }    public function find_command($cName){ //确定shell位置
        $path = array('/bin', '/sbin', '/usr/bin', '/usr/sbin', '/usr/local/bin', '/usr/local/sbin');        foreach($path as $p) {            if (@is_executable("$p/$commandName")) return "$p/$commandName";
        }        return false;
    }    public function GetCPUUse(){
        $data = @file('/proc/stat');        $cores = array();        foreach ($data as $line) {            if(preg_match('/^cpu[0-9]/', $line)){                $info = explode(' ', $line);                $cores[]=array('user'=>$info[1],'nice'=>$info[2],'sys' => $info[3],'idle'=>$info[4],'iowait'=>$info[5],'irq' => $info[6],'softirq' => $info[7]);
            }
        }        return $cores;
    }    public function GetCPUPercent($CPU1,$CPU2){
        $num = count($CPU1);        if($num!==count($CPU2)) return;        $cups = array();        for ($i=0; $i $y)                $cpu[$x] = round($y/$total*100, 2);            $cpus['cpu'.$i] = $cpu;
        }        return $cpus;
    }    public function GetDisk(){ //获取硬盘情况
        $d['t'] = round(@disk_total_space(".")/(1024*1024*1024),3);        $d['f'] = round(@disk_free_space(".")/(1024*1024*1024),3);        $d['u'] = $d['t']-$d['f'];        $d['PCT'] = (floatval($d['t'])!=0)?round($d['u']/$d['t']*100,2):0;        return $d;
    }    private function formatmem($mem){ //格试化内存显示单位
        if(!is_array($mem)) return $mem;        $tmp = array(            'memTotal', 'memUsed', 'memFree', 'memPercent',            'memCached', 'memRealPercent',            'swapTotal', 'swapUsed', 'swapFree', 'swapPercent'
        );        foreach ($mem as $k=>$v) {            if(!strpos($k, 'Percent')){                $v = $vformatsize($info[10][0]);            $res['NetInput'][$i] = $this->formatsize($info[2][0]);            $res['NetWorkName'][$i] = $info[1][0];
        }        return $res;
    }    public function formatsize($size) { //单位转换
        $danwei=array(' B ',' K ',' M ',' G ',' T ');        $allsize=array();        $i=0;        for($i = 0; $i =0; $l--) {            $allsize1[$l]=floor($size/pow(1024,$l));            $allsize[$l]=$allsize1[$l]-$allsize1[$l+1]*1024;
        }        $len=count($allsize);        for($j = $len-1; $j >=0; $j--) {            $fsize=$fsize.$allsize[$j].$danwei[$j];
        }        return $fsize;
    }    public function phpexts(){ //以编译模块
        $able = get_loaded_extensions();        $str = '';        foreach ($able as $key => $value) {            if ($key!=0 && $key%13==0) {                $str .= '<br>';
            }            $str .= "$value  ";
        }        return $str;
    }    public function show($varName){ //检测PHP设置参数
        switch($result = get_cfg_var($varName)){            case 0:                return '<font>×</font>';            break;            case 1:                return '<font>√</font>';            break;            default:                return $result;            break;
        }
    }    public function GetDisFuns(){
        $disFuns=get_cfg_var("disable_functions");        $str = '';        if(empty($disFuns)){            $str = '<font>×</font>';
        }else{            $disFunsarr =  explode(',',$disFuns);            foreach ($disFunsarr as $key=>$value) {                if ($key!=0 && $key%8==0) {                    $str .= '<br>';
                }                $str .= "$value  ";
            }
        }        return $str;
    }    public function isfun($funName='',$j=0){ // 检测函数支持
        if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName, $tmp)) return '错误';        if(!$j){            return (function_exists($funName) !== false) ? '<font>√</font>' : '<font>×</font>';
        }else{            return (function_exists($funName) !== false) ? '√' : '×';
        }
    }    public function GetGDVer(){
        $strgd = '<font>×</font>';        if(function_exists(gd_info)) {            $gd_info = @gd_info();            $strgd = $gd_info["GD Version"];
        }        return $strgd;
    }    public function GetZendInfo(){
        $zendInfo = array();        $zendInfo['ver'] = zend_version()?zend_version():'<font>×</font>';        $phpv = substr(PHP_VERSION,2,1);        $zendInfo['loader'] = $phpv>2?'ZendGuardLoader[启用]':'Zend Optimizer';        if($phpv>2){            $zendInfo['html'] = get_cfg_var("zend_loader.enable")?'<font>√</font>':'<font>×</font>';
        }elseif(function_exists('zend_optimizer_version')){            $zendInfo['html'] = zend_optimizer_version();
        }else{            $zendInfo['html']= (get_cfg_var("zend_optimizer.optimization_level") ||
                                get_cfg_var("zend_extension_manager.optimizer_ts") ||
                                get_cfg_var("zend.ze1_compatibility_mode") ||
                                get_cfg_var("zend_extension_ts"))?'<font>√</font>':'<font>×</font>';
        }        return $zendInfo;
    }    public function GetIconcube(){
        $str = '<font>×</font>';        if(extension_loaded('ionCube Loader')){            $ys = ionCube_Loader_version();            $gm = '.'.(int)substr($ys, 3, 2);            $str = $ys.$gm;
        }        return $str;
    }    public function CHKModule($cName){
        if(empty($cName)) return '错误';        $str = phpversion($cName);        return empty($str)?'<font>×</font>':$str;
    }    public function GetDBVer($dbname){
        if(empty($dbname)) return '错误';        switch ($dbname) {            case 'mysql':                if(function_exists("mysql_get_server_info")){                    $s = @mysql_get_server_info();                    $s = $s ? '  mysql_server 版本:'.$s:'';                    $c = @mysql_get_client_info();                    $c = $c ? '  mysql_client 版本:'.$c:'';                    return $s.$c;
                }                return '';                break;            case 'sqlite':                if(extension_loaded('sqlite3')){                    $sqliteVer = SQLite3::version();                    $str = '<font>√</font>';                    $str .= 'SQLite3 Ver'.$sqliteVer['versionString'];
                }else{                    $str = $this->isfun('sqlite_close');                    if(strpos($str, '√')!==false){                        $str .= '  版本:'.sqlite_libversion();
                    }
                }                return $str;                break;            default:                return '';                break;
        }
    }
}$title = 'PHP服务器信息探针';$j_version = '1.0.0';$S = new ServerInfo();$phpSelf = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];$disFuns=get_cfg_var("disable_functions");$disFuns = strpos('phpinfo', needle)?'<font>×</font>':"<a>PHPINFO</a>";$strcookies = isset($_COOKIE)?'<font>√</font>' : '<font>×</font>';$strsmtp = get_cfg_var("SMTP")?'<font>√</font>' : '<font>×</font>';$smtpadd = get_cfg_var("SMTP")?get_cfg_var("SMTP"):'<font>×</font>';//ajax调用实时刷新if ($_GET['act'] == "rt"){    $arr=array('useSpace'=>$S->hd['u'],        'freeSpace'=>$S->hd['f'],        'hdPercent'=>$S->hd['PCT'],        'barhdPercent'=>$S->hd['PCT'].'%',        'TotalMemory'=>$S->sysInfo['memTotal'],        'UsedMemory'=>$S->sysInfo['memUsed'],        'FreeMemory'=>$S->sysInfo['memFree'],        'CachedMemory'=>$S->sysInfo['memCached'],        'Buffers'=>$S->sysInfo['memBuffers'],        'TotalSwap'=>$S->sysInfo['swapTotal'],        'swapUsed'=>$S->sysInfo['swapUsed'],        'swapFree'=>$S->sysInfo['swapFree'],        'loadAvg'=>$S->sysInfo['loadAvg'],        'uptime'=>$S->sysInfo['uptime'],        'freetime'=>"$freetime",        'bjtime'=>"$bjtime",        'stime'=>$S->S['sTime'],        'cpuuse'=>$S->CPU_Use,        'memRealPercent'=>$S->sysInfo['memRealPercent'],        'memRealUsed'=>$S->sysInfo['memRealUsed'],        'memRealFree'=>$S->sysInfo['memRealFree'],        'memPercent'=>$S->sysInfo['memPercent'].'%',        'memCachedPercent'=>$S->sysInfo['memCachedPercent'],        'barmemCachedPercent'=>$S->sysInfo['memCachedPercent'].'%',        'swapPercent'=>$S->sysInfo['swapPercent'],        'barmemRealPercent'=>$S->sysInfo['memRealPercent'].'%',        'barswapPercent'=>$S->sysInfo['swapPercent'].'%',        'NetOut2'=>$S->NetWork['NetOut'][2],        'NetOut3'=>$S->NetWork['NetOut'][3],        'NetOut4'=>$S->NetWork['NetOut'][4],        'NetOut5'=>$S->NetWork['NetOut'][5],        'NetOut6'=>$S->NetWork['NetOut'][6],        'NetOut7'=>$S->NetWork['NetOut'][7],        'NetOut8'=>$S->NetWork['NetOut'][8],        'NetOut9'=>$S->NetWork['NetOut'][9],        'NetOut10'=>$S->NetWork['NetOut'][10],        'NetInput2'=>$S->NetWork['NetInput'][2],        'NetInput3'=>$S->NetWork['NetInput'][3],        'NetInput4'=>$S->NetWork['NetInput'][4],        'NetInput5'=>$S->NetWork['NetInput'][5],        'NetInput6'=>$S->NetWork['NetInput'][6],        'NetInput7'=>$S->NetWork['NetInput'][7],        'NetInput8'=>$S->NetWork['NetInput'][8],        'NetInput9'=>$S->NetWork['NetInput'][9],        'NetInput10'=>$S->NetWork['NetInput'][10],        'NetOutSpeed2'=>$S->NetWork['OutSpeed'][2],        'NetOutSpeed3'=>$S->NetWork['OutSpeed'][3],        'NetOutSpeed4'=>$S->NetWork['OutSpeed'][4],        'NetOutSpeed5'=>$S->NetWork['OutSpeed'][5],        'NetInputSpeed2'=>$S->NetWork['InputSpeed'][2],        'NetInputSpeed3'=>$S->NetWork['InputSpeed'][3],        'NetInputSpeed4'=>$S->NetWork['InputSpeed'][4],        'NetInputSpeed5'=>$S->NetWork['InputSpeed'][5]
        );    $jarr=json_encode($arr);    $_GET['callback'] = htmlspecialchars($_GET['callback']);    echo $_GET['callback'],'(',$jarr,')';    exit;
}function memory_usage() {
    $memory  = ( ! function_exists('memory_get_usage')) ? '0' : round(memory_get_usage()/1024/1024, 2).'MB';    return $memory;
}// 计时function microtime_float() {
    $mtime = microtime();    $mtime = explode(' ', $mtime);    return $mtime[1] + $mtime[0];
}?>nbsp;html><title>=$title?></title><meta><meta><style><!--* {font-family: "Microsoft Yahei",Tahoma, Arial; }body{text-align: center; margin: 0 auto; padding: 0; background-color:#fafafa;font-size:12px;font-family:Tahoma, Arial}h1 {font-size: 26px; padding: 0; margin: 0; color: #333333; font-family: "Lucida Sans Unicode","Lucida Grande",sans-serif;}h1 small {font-size: 11px; font-family: Tahoma; font-weight: bold; }a{color: #666; text-decoration:none;}a.black{color: #000000; text-decoration:none;}.w_logo{height:25px;text-align:center;color:#333;font-size: 15px; width:13%; }.j_top{display:table;font-weight:bold;background:#dedede;color:#626262;width: 100%;text-align: left; height: 25px; line-height: 25px;box-shadow: 1px 1px 1px #CCC;-moz-box-shadow: 1px 1px 1px #CCC;-webkit-box-shadow: 1px 1px 1px #CCC;-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=2, Direction=135, Color=&#39;#CCCCCC&#39;)";}.j_top a{text-align:center; width:8.7%; display: table-cell; padding: 5px 0px;}.j_top a:hover{background:#dadada;}.con{width: 90%;margin: 10px auto;}.con .j_top{ padding: 0px 10px;}.j_tb{display:table;width:100%;padding:5px 10px;border-bottom:1px solid #CCCCCC;text-align:left;}.j_td{display:table-cell;}.j_td_t{width:120px;}.j_td_c{width:50%;}.j_td_t1{width:320px;}.w_foot{height:25px;text-align:center; background:#dedede;}input{padding: 2px; background: #FFFFFF; border-top:1px solid #666666; border-left:1px solid #666666; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC; font-size:12px}input.btn{font-weight: bold; height: 20px; line-height: 20px; padding: 0 6px; color:#666666; background: #f2f2f2; border:1px solid #999;font-size:12px}.bar {border:1px solid #999999; background:#FFFFFF; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px; overflow: hidden;}.bar_1 {border:1px dotted #999999; background:#FFFFFF; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px; overflow: hidden;}.barli_red{background:#ff6600; height:5px; margin:0px; padding:0;}.barli_blue{background:#0099FF; height:5px; margin:0px; padding:0;}.barli_green{background:#36b52a; height:5px; margin:0px; padding:0;}.barli_black{background:#333; height:5px; margin:0px; padding:0;}.barli_1{background:#999999; height:5px; margin:0px; padding:0;}.barli{background:#36b52a; height:5px; margin:0px; padding:0;}#page {width: 100%; padding: 0 auto; margin: 0 auto; text-align: left;}#header{position:relative; padding:5px;}--></style><script></script><script>$(document).ready(function(){getJSONData();});var OutSpeed2=<?=floor($S->NetWork[&#39;OutSpeed&#39;][2]);?>;var OutSpeed3=<?=floor($S->NetWork[&#39;OutSpeed&#39;][3]);?>;var OutSpeed4=<?=floor($S->NetWork[&#39;OutSpeed&#39;][4]);?>;var OutSpeed5=<?=floor($S->NetWork[&#39;OutSpeed&#39;][5]);?>;var InputSpeed2=<?=floor($S->NetWork[&#39;InputSpeed&#39;][2]);?>;var InputSpeed3=<?=floor($S->NetWork[&#39;InputSpeed&#39;][3]);?>;var InputSpeed4=<?=floor($S->NetWork[&#39;InputSpeed&#39;][4]);?>;var InputSpeed5=<?=floor($S->NetWork[&#39;InputSpeed&#39;][5]);?>;function getJSONData(){
    setTimeout("getJSONData()", 1000);
    $.getJSON(&#39;?act=rt&callback=?&#39;, displayData);
}function ForDight(Dight,How){
  if (Dight<0){    var Last=0+"B/s";
  }else if (Dight<1024){    var Last=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"B/s";
  }else if (Dight<1048576){
    Dight=Dight/1024;    var Last=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"K/s";
  }else{
    Dight=Dight/1048576;    var Last=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"M/s";
  }    return Last;
}function displayData(dataJSON){
    $("#useSpace").html(dataJSON.useSpace);
    $("#freeSpace").html(dataJSON.freeSpace);
    $("#hdPercent").html(dataJSON.hdPercent);
    $("#barhdPercent").width(dataJSON.barhdPercent);
    $("#TotalMemory").html(dataJSON.TotalMemory);
    $("#UsedMemory").html(dataJSON.UsedMemory);
    $("#FreeMemory").html(dataJSON.FreeMemory);
    $("#CachedMemory").html(dataJSON.CachedMemory);
    $("#Buffers").html(dataJSON.Buffers);
    $("#TotalSwap").html(dataJSON.TotalSwap);
    $("#swapUsed").html(dataJSON.swapUsed);
    $("#swapFree").html(dataJSON.swapFree);
    $("#swapPercent").html(dataJSON.swapPercent);
    $("#loadAvg").html(dataJSON.loadAvg);
    $("#uptime").html(dataJSON.uptime);
    $("#freetime").html(dataJSON.freetime);
    $("#stime").html(dataJSON.stime);
    $("#bjtime").html(dataJSON.bjtime);
    $("#cpuuse").html(dataJSON.cpuuse);
    $("#memRealUsed").html(dataJSON.memRealUsed);
    $("#memRealFree").html(dataJSON.memRealFree);
    $("#memRealPercent").html(dataJSON.memRealPercent);
    $("#memPercent").html(dataJSON.memPercent);
    $("#barmemPercent").width(dataJSON.memPercent);
    $("#barmemRealPercent").width(dataJSON.barmemRealPercent);
    $("#memCachedPercent").html(dataJSON.memCachedPercent);
    $("#barmemCachedPercent").width(dataJSON.barmemCachedPercent);
    $("#barswapPercent").width(dataJSON.barswapPercent);
    $("#NetOut2").html(dataJSON.NetOut2);
    $("#NetOut3").html(dataJSON.NetOut3);
    $("#NetOut4").html(dataJSON.NetOut4);
    $("#NetOut5").html(dataJSON.NetOut5);
    $("#NetOut6").html(dataJSON.NetOut6);
    $("#NetOut7").html(dataJSON.NetOut7);
    $("#NetOut8").html(dataJSON.NetOut8);
    $("#NetOut9").html(dataJSON.NetOut9);
    $("#NetOut10").html(dataJSON.NetOut10);
    $("#NetInput2").html(dataJSON.NetInput2);
    $("#NetInput3").html(dataJSON.NetInput3);
    $("#NetInput4").html(dataJSON.NetInput4);
    $("#NetInput5").html(dataJSON.NetInput5);
    $("#NetInput6").html(dataJSON.NetInput6);
    $("#NetInput7").html(dataJSON.NetInput7);
    $("#NetInput8").html(dataJSON.NetInput8);
    $("#NetInput9").html(dataJSON.NetInput9);
    $("#NetInput10").html(dataJSON.NetInput10);
    $("#NetOutSpeed2").html(ForDight((dataJSON.NetOutSpeed2-OutSpeed2),3)); OutSpeed2=dataJSON.NetOutSpeed2;
    $("#NetOutSpeed3").html(ForDight((dataJSON.NetOutSpeed3-OutSpeed3),3)); OutSpeed3=dataJSON.NetOutSpeed3;
    $("#NetOutSpeed4").html(ForDight((dataJSON.NetOutSpeed4-OutSpeed4),3)); OutSpeed4=dataJSON.NetOutSpeed4;
    $("#NetOutSpeed5").html(ForDight((dataJSON.NetOutSpeed5-OutSpeed5),3)); OutSpeed5=dataJSON.NetOutSpeed5;
    $("#NetInputSpeed2").html(ForDight((dataJSON.NetInputSpeed2-InputSpeed2),3));   InputSpeed2=dataJSON.NetInputSpeed2;
    $("#NetInputSpeed3").html(ForDight((dataJSON.NetInputSpeed3-InputSpeed3),3));   InputSpeed3=dataJSON.NetInputSpeed3;
    $("#NetInputSpeed4").html(ForDight((dataJSON.NetInputSpeed4-InputSpeed4),3));   InputSpeed4=dataJSON.NetInputSpeed4;
    $("#NetInputSpeed5").html(ForDight((dataJSON.NetInputSpeed5-InputSpeed5),3));   InputSpeed5=dataJSON.NetInputSpeed5;
}</script><a></a><p>
    </p><p><a>PHP参数</a>
        <a>组件支持</a>
        <a>第三方组件</a>
        <a>数据库支持</a>
        <a>性能检测</a>
        <a>网速检测</a>
        <a>MySQL检测</a>
        <a>函数检测</a>
        <a>邮件检测</a>
    </p>
    <!--Server info-->
    <p>
        </p><p>服务器参数</p>
        <p><label>服务器域名/IP地址</label><label>=$S->S['DomainIP'];?></label></p>
        <p><label>服务器标识</label><label>=$S->S['Flag'];?></label></p>
        <p>
            </p><p><label>服务器操作系统</label><label>=$S->S['OS'];?></label></p>
            <p><label>服务器解译引擎</label><label>=$S->S['WebEngine'];?></label></p>
        
        <p>
            </p><p><label>服务器语言</label><label>=$S->S['Language'];?></label></p>
            <p><label>服务器端口</label><label>=$S->S['WebPort'];?></label></p>
        
        <p>
            </p><p><label>服务器主机名</label><label>=$S->S['Name'];?></label></p>
            <p><label>绝对路径</label><label>=$S->S['WebPath'];?></label></p>
        
        <p>
            </p><p><label>管理员邮箱</label><label>=$S->S['Email'];?></label></p>
            <p><label>探针路径</label><label>=$S->S['ProbePath'];?></label></p>
        
    
    <!--Server Real-Time-->
    <p>
        </p><p>服务器实时数据</p>
        <p>
            </p><p><label>服务器当前时间</label><label>=$S->S['sTime'];?></label></p>
            <p><label>服务器已运行时间</label><label>=$S->sysInfo['uptime'];?></label></p>
        
        <p><label>CPU型号[=$S->sysInfo['cpu']['num'];?>核]</label><label>=$S->sysInfo['cpu']['model'];?></label></p>
        <p><label>CPU使用情况</label><label>=$S->CPU_Use;?></label></p>
        <p><label>硬盘使用状况</label>
            <label>总空间 =$S->hd['t'];?> G,已用 <font><span>=$S->hd['u'];?></span></font> G,
                空闲 <font><span>=$S->hd['f'];?></span></font> G,
                使用率 <span>=$S->hd['PCT'];?></span>%                <p></p>
<p>hd['PCT']?>%" > </p> </label></p>
            
        
        <p><label>内存使用状况</label>
            <label>物理内存:共<font>=$S->sysInfo['memTotal'];?> </font>
                , 已用<font><span>=$S->sysInfo['memUsed']?></span></font>
                , 空闲<font><span>=$S->sysInfo['memFree'];?></span></font>
                , 使用率<span>=$S->sysInfo['memPercent'];?></span>
                <p></p>
<p>sysInfo['memPercent'];?>%" > </p></label></p>
            <?php  if($S->sysInfo['memCached']){ ?>
                Cache化内存为 <span>=$S->sysInfo['memCached'];?></span>
                , 使用率<span>=$S->sysInfo['memCachedPercent'];?></span>% |
                Buffers缓冲为  <span>=$S->sysInfo['memBuffers'];?></span>
                <p></p><p>sysInfo['memCachedPercent'];?>%" > </p>
                真实内存使用<span>=$S->sysInfo['memRealUsed'];?></span>
                , 真实内存空闲<span>=$S->sysInfo['memRealFree'];?></span>
                , 使用率<span>=$S->sysInfo['memRealPercent'];?></span>%                <p></p><p>sysInfo['memRealPercent'];?>%" > </p>
            <?php  } ?>
            <?php  if($S->sysInfo['swapTotal']){ ?>
                SWAP区:共=$S->sysInfo['swapTotal'];?>
                , 已使用<span>=$S->sysInfo['swapUsed'];?></span>
                , 空闲<span>=$S->sysInfo['swapFree'];?></span>
                , 使用率<span>=$S->sysInfo['swapPercent'];?></span>%                <p></p><p>sysInfo['swapPercent'];?>%" > </p> 
            <?php  } ?>
            
        
        <p><label>系统平均负载</label><label>=$S->sysInfo['loadAvg']?></label></p>
    
    <!--net work-->
    <p>
        </p><p>网络使用状况</p>
        <?php             $netnum = count($S->NetWork);            for ($i=2; $i 
                <p>
                    <label>=$S->NetWork['NetWorkName'][$i]?></label>
                    <label>入网:<font><span>">=$S->NetWork['NetInput'][$i];?></span></font></label>
                    <label>实时:<font><span>">0B/s</span></font></label>
                    <label>出网: <font><span>">=$S->NetWork['NetOut'][$i];?></span></font></label>
                    <label>实时: <font><span>">0B/s</span></font></label>
                </p>
        <?php  } ?>
    
    <!--enbale module-->
    <p>
        </p><p>PHP已编译模块检测</p>
        <p><label>=$S->phpexts();?></label></p>
    
    <!--enbale module-->
    <a></a>
    <p>
        </p><p>PHP相关参数</p>
        <p>
            </p><p><label>PHP信息(phpinfo):</label><label>=$disFuns;?></label></p>
            <p><label>PHP版本(php_version):</label><label>=PHP_VERSION;?></label></p>
        
        <p>
            </p><p><label>PHP运行方式:</label><label>=strtoupper(php_sapi_name());?></label></p>
            <p><label>脚本占用最大内存(memory_limit):</label><label>=$S::show("memory_limit");?></label></p>
        
        <p>
            </p><p><label>PHP安全模式(safe_mode):</label><label>=$S::show("safe_mode");?></label></p>
            <p><label>POST方法提交最大限制(post_max_size):</label><label>=$S::show("post_max_size");?></label></p>
        
        <p>
            </p><p><label>上传文件最大限制(upload_max_filesize):</label><label>=$S::show("upload_max_filesize");?></label></p>
            <p><label>浮点型数据显示的有效位数(precision):</label><label>=$S::show("precision");?></label></p>
        
        <p>
            </p><p><label>脚本超时时间(max_execution_time):</label><label>=$S::show("max_execution_time");?>秒</label></p>
            <p><label>socket超时时间(default_socket_timeout):</label><label>=$S::show("default_socket_timeout");?>秒</label></p>
        
        <p>
            </p><p><label>PHP页面根目录(doc_root):</label><label>=$S::show("doc_root");?></label></p>
            <p><label>用户根目录(user_dir):</label><label>=$S::show("user_dir");?></label></p>
        
        <p>
            </p><p><label>dl()函数(enable_dl):</label><label>=$S::show("enable_dl");?></label></p>
            <p><label>指定包含文件目录(include_path):</label><label>=$S::show("include_path");?></label></p>
        
        <p>
            </p><p><label>显示错误信息(display_errors):</label><label>=$S::show("display_errors");?></label></p>
            <p><label>自定义全局变量(register_globals):</label><label>=$S::show("register_globals");?></label></p>
        
        <p>
            </p><p><label>数据反斜杠转义(magic_quotes_gpc):</label><label>=$S::show("magic_quotes_gpc");?></label></p>
            <p><label>"<?...?>"短标签(short_open_tag):</label><label>=$S::show("short_open_tag");?></label></p>
        
        <p>
            </p><p><label>"<% %>"ASP风格标记(asp_tags):</label><label>=$S::show("asp_tags");?></label></p>
            <p><label>忽略重复错误信息(ignore_repeated_errors):</label><label>=$S::show("ignore_repeated_errors");?></label></p>
        
        <p>
            </p><p><label>忽略重复的错误源(ignore_repeated_source):</label><label>=$S::show("ignore_repeated_source");?></label></p>
            <p><label>报告内存泄漏(report_memleaks):</label><label>=$S::show("report_memleaks");?></label></p>
        
        <p>
            </p><p><label>自动字符串转义(magic_quotes_gpc):</label><label>=$S::show("magic_quotes_gpc");?></label></p>
            <p><label>外部字符串自动转义(magic_quotes_runtime):</label><label>=$S::show("magic_quotes_runtime");?></label></p>
        
        <p>
            </p><p><label>打开远程文件(allow_url_fopen):</label><label>=$S::show("allow_url_fopen");?></label></p>
            <p><label>声明argv和argc变量(register_argc_argv):</label><label>=$S::show("register_argc_argv");?></label></p>
        
        <p>
            </p><p><label>Cookie 支持:</label><label>=$strcookies;?></label></p>
            <p><label>拼写检查(ASpell Library):</label><label>=$S::isfun("aspell_check_raw");?></label></p>
        
        <p>
            </p><p><label>高精度数学运算(BCMath):</label><label>=$S::isfun("bcadd");?></label></p>
            <p><label>PREL相容语法(PCRE):</label><label>=$S::isfun("preg_match");?></label></p>
        
        <p>
            </p><p><label>PDF文档支持:</label><label>=$S::isfun("pdf_close");?></label></p>
            <p><label>SNMP网络管理协议:</label><label>=$S::isfun("snmpget");?></label></p>
        
        <p>
            </p><p><label>VMailMgr邮件处理:</label><label>=$S::isfun("vm_adduser");?></label></p>
            <p><label>Curl支持:</label><label>=$S::isfun("curl_init");?></label></p>
        
        <p>
            </p><p><label>SMTP支持:</label><label>=$strsmtp;?></label></p>
            <p><label>SMTP地址:</label><label>=$smtpadd;?></label></p>
        
        <p>
            <label>默认支持函数(enable_functions):</label><label><a>?act=Function' target='_blank' class='static'>请点这里查看详细!</a></label>
        </p>
        <p>
            </p><p><label>被禁用的函数(disable_functions):</label><label>=$S::GetDisFuns();?></label></p>
        
    
    <!--组件支持-->
    <a></a>
    <p>
        </p><p>组件支持</p>
        <p>
            </p><p><label>FTP支持:</label><label>=$S::isfun("ftp_login");?></label></p>
            <p><label>XML解析支持:</label><label>=$S::isfun("xml_set_object");?></label></p>
        
        <p>
            </p><p><label>Session支持:</label><label>=$S::isfun("session_start");?></label></p>
            <p><label>Socket支持:</label><label>=$S::isfun("socket_accept");?></label></p>
        
        <p>
            </p><p><label>Calendar支持</label><label>=$S::isfun('cal_days_in_month');?></label></p>
            <p><label>允许URL打开文件:</label><label>=$S::show("allow_url_fopen");?></label></p>
        
        <p>
            </p><p><label>GD库支持:</label><label>=$S::GetGDVer();?></label></p>
            <p><label>压缩文件支持(Zlib):</label><label>=$S::isfun("gzclose");?></label></p>
        
        <p>
            </p><p><label>IMAP电子邮件系统函数库:</label><label>=$S::isfun("imap_close");?></label></p>
            <p><label>历法运算函数库:</label><label>=$S::isfun("JDToGregorian");?></label></p>
        
        <p>
            </p><p><label>正则表达式函数库:</label><label>=$S::isfun("preg_match");?></label></p>
            <p><label>WDDX支持:</label><label>=$S::isfun("wddx_add_vars");?></label></p>
        
        <p>
            </p><p><label>Iconv编码转换:</label><label>=$S::isfun("iconv");?></label></p>
            <p><label>mbstring:</label><label>=$S::isfun("mb_eregi");?></label></p>
        
        <p>
            </p><p><label>高精度数学运算:</label><label>=$S::isfun("bcadd");?></label></p>
            <p><label>LDAP目录协议:</label><label>=$S::isfun("ldap_close");?></label></p>
        
        <p>
            </p><p><label>MCrypt加密处理:</label><label>=$S::isfun("mcrypt_cbc");?></label></p>
            <p><label>哈稀计算:</label><label>=$S::isfun("mhash_count");?></label></p>
        
    
    <a></a>
    <!--第三方组件信息-->
    <p>
        </p><p>第三方组件</p>
        <p>$zendInfo = $S::GetZendInfo();?>
            </p><p><label>Zend版本</label><label>=$zendInfo['ver'];?></label></p>
            <p><label>=$zendInfo['loader']?></label><label>=$zendInfo['html'];?></label></p>
        
        <p>
            </p><p><label>eAccelerator</label><label>=$S->CHKModule('eAccelerator');?></label></p>
            <p><label>ioncube</label><label>=$S->GetIconcube();?></label></p>
        
        <p>
            </p><p><label>XCache</label><label>=$S->CHKModule('XCache');?></label></p>
            <p><label>APC</label><label>=$S->CHKModule('APC');?></label></p>
        
    
    <a></a>
    <!--db-->
    <p>
        </p><p>数据库支持</p>
        <p>
            </p><p><label>MySQL 数据库:</label><label>=$S::isfun('mysql_close').$S::GetDBVer('mysql');?></label></p>
            <p><label>ODBC 数据库:</label><label>=$S::isfun("odbc_close");?></label></p>
        
        <p>
            </p><p><label>Oracle 数据库:</label><label>=$S::isfun("ora_close");?></label></p>
            <p><label>SQL Server 数据库:</label><label>$S::isfun("mssql_close");?></label></p>
        
        <p>
            </p><p><label>dBASE 数据库:</label><label>=$S::isfun("dbase_close");?></label></p>
            <p><label>mSQL 数据库:</label><label>=$S::isfun("msql_close");?></label></p>
        
        <p>
            </p><p><label>SQLite 数据库:</label><label>=$S->GetDBVer('sqlite');?></label></p>
            <p><label>Hyperwave 数据库:</label><label>=$S::isfun("hw_close");?></label></p>
        
        <p>
            </p><p><label>Postgre SQL 数据库:</label><label>=$S::isfun("pg_close"); ?></label></p>
            <p><label>Informix 数据库:</label><label>=$S::isfun("ifx_close");?></label></p>
        
        <p>
            </p><p><label>DBA 数据库:</label><label>=$S::isfun("dba_close");?></label></p>
            <p><label>DBM 数据库:</label><label>=$S::isfun("dbmclose");?></label></p>
        
        <p>
            </p><p><label>FilePro 数据库:</label><label>=$S::isfun("filepro_fieldcount");?></label></p>
            <p><label>SyBase 数据库:</label><label>=$S::isfun("sybase_close");?></label></p>
        
    

    <p>
        </p><p><?php  $run_time = sprintf(&#39;%0.4f&#39;, microtime_float() - $time_start);?>Processed in <?php  echo $run_time?> seconds. <?php  echo memory_usage();?> memory usage.</p>
    

相关推荐:

php探针在Linux下的安装过程

什么是php探针?php探针有什么作用?

php探针检测虚拟主机配置信息的案例

The above is the detailed content of Implementation code of PHP server probe. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Apr 17, 2025 am 12:22 AM

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP: An Introduction to the Server-Side Scripting LanguagePHP: An Introduction to the Server-Side Scripting LanguageApr 16, 2025 am 12:18 AM

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP and the Web: Exploring its Long-Term ImpactPHP and the Web: Exploring its Long-Term ImpactApr 16, 2025 am 12:17 AM

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

Why Use PHP? Advantages and Benefits ExplainedWhy Use PHP? Advantages and Benefits ExplainedApr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools