PHP服務器信息探針可以檢測網絡流量,CPU,硬盤,內存使用情況,網站管理員必備



<?
error_reporting(0);//抑制所有錯誤信息
@header("content-Type: text/html; charset=utf-8");//語言強制
ob_start();
date_default_timezone_set('Asia/Shanghai');//此句用於消除時間差
$time_start= microtime_float();
 
/**
*
*/
class ServerInfo{
    //服務器參數
    public$S = array(
        'YourIP',//你的IP
        'DomainIP',//服務器域名和IP及進程用戶名
        'Flag',//服務器標識
        'OS',//服務器操作系統具體
        'Language',//服務器語言
        'Name',//服務器主機名
        'Email',//服務器管理員郵箱
        'WebEngine',//服務器WEB服務引擎
        'WebPort',//web服務端口
        'WebPath',//web路徑
        'ProbePath',//本腳本所在路徑
        'sTime'//服務器時間
        );
 
    public$sysInfo; //系統信息,windows和linux
    public$CPU_Use;
    public$hd = array(
        't',//硬盤總量
        'f',//可用
        'u',//已用
        'PCT',//使用率
        );
    public$NetWork = array(
        'NetWorkName',//網卡名稱
        'NetOut',//出網總量
        'NetInput',//入網總量
        'OutSpeed',//出網速度
        'InputSpeed'//入網速度
        );//網卡流量
 
    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();
    }
    publicfunction OS(){
        returnDIRECTORY_SEPARATOR=='/'?true:false;
    }
    publicfunction GetsysInfo(){
        switch(PHP_OS) {
            case'Linux':
                $sysInfo= $this->sys_linux();
                break;
            case'FreeBSD':
                $sysInfo= $this->sys_freebsd();
                break;
            default:
                # code...
                break;
        }
        return$sysInfo;
    }
    publicfunction 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;
    }
    publicfunction 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]+)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;
    }
    publicfunction 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);
            returntrim($buffers);
        }
        returnfalse;
    }
    publicfunction find_command($cName){//確定shell位置
        $path= array('/bin','/sbin', '/usr/bin','/usr/sbin', '/usr/local/bin', '/usr/local/sbin');
        foreach($pathas $p) {
            if(@is_executable("$p/$commandName"))return "$p/$commandName";
        }
        returnfalse;
    }
    publicfunction 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;
    }
    publicfunction GetCPUPercent($CPU1,$CPU2){
        $num= count($CPU1);
        if($num!==count($CPU2))return;
        $cups= array();
        for($i=0;$i < $num;$i++) {
            $dif= array();
            $dif['user']    =$CPU2[$i]['user'] -$CPU1[$i]['user'];
            $dif['nice']    =$CPU2[$i]['nice'] -$CPU1[$i]['nice'];
            $dif['sys']     =$CPU2[$i]['sys'] -$CPU1[$i]['sys'];
            $dif['idle']    =$CPU2[$i]['idle'] -$CPU1[$i]['idle'];
            $dif['iowait']  =$CPU2[$i]['iowait'] -$CPU1[$i]['iowait'];
            $dif['irq']     =$CPU2[$i]['irq'] -$CPU1[$i]['irq'];
            $dif['softirq'] =$CPU2[$i]['softirq'] -$CPU1[$i]['softirq'];
            $total= array_sum($dif);
            $cpu= array();
            foreach($difas $x=>$y)
                $cpu[$x] =round($y/$total*100, 2);
            $cpus['cpu'.$i] = $cpu;
        }
        return$cpus;
    }
    publicfunction 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;
    }
    privatefunction 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= $v<1024?$v.' M':$v.' G';
            }
            $mem[$k] =$v;
        }
        foreach($tmp as $v) {
            $mem[$v] =$mem[$v]?$mem[$v]:0;
        }
        return$mem;
    }
    publicfunction GetNetWork(){ //網卡流量
        $strs= @file("/proc/net/dev");
        $lines= count($strs);
        for($i=2;$i < $lines;$i++) {
            preg_match_all("/([^\s]+):[\s]{0,}(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/",$strs[$i],$info );
            $res['OutSpeed'][$i] = $info[10][0];
            $res['InputSpeed'][$i] = $info[2][0];
            $res['NetOut'][$i] = $this->formatsize($info[10][0]);
            $res['NetInput'][$i] = $this->formatsize($info[2][0]);
            $res['NetWorkName'][$i] = $info[1][0];
        }
        return$res;
    }
    publicfunction formatsize($size) {//單位轉換
        $danwei=array(' B ',' K ',' M ',' G ',' T ');
        $allsize=array();
        $i=0;
        for($i= 0; $i <5; $i++) {
            if(floor($size/pow(1024,$i))==0){break;}
        }
        for($l= $i-1;$l >=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;
    }
    publicfunction phpexts(){ //以編譯模塊
        $able= get_loaded_extensions();
        $str= '';
        foreach($able as $key => $value) {
            if($key!=0 &&$key%13==0) {
                $str.= '<br />';
            }
            $str.= "$value&nbsp;&nbsp;";
        }
        return$str;
    }
    publicfunction show($varName){//檢測PHP設置參數
        switch($result= get_cfg_var($varName)){
            case0:
                return'<font color="red">×</font>';
            break;
            case1:
                return'<font color="green">√</font>';
            break;
            default:
                return$result;
            break;
        }
    }
    publicfunction GetDisFuns(){
        $disFuns=get_cfg_var("disable_functions");
        $str= '';
        if(empty($disFuns)){
            $str= '<font color=red>×</font>';
        }else{
            $disFunsarrexplode(',',$disFuns);
            foreach($disFunsarr as $key=>$value) {
                if($key!=0 &&$key%8==0) {
                    $str.= '<br />';
                }
                $str.= "$value&nbsp;&nbsp;";
            }
        }
        return$str;
    }
    publicfunction 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 color="green">√</font>' : '<font color="red">×</font>';
        }else{
            return(function_exists($funName) !== false) ?'√' : '×';
        }
    }
    publicfunction GetGDVer(){
        $strgd= '<font color="red">×</font>';
        if(function_exists(gd_info)) {
            $gd_info= @gd_info();
            $strgd= $gd_info["GD Version"];
        }
        return$strgd;
    }
    publicfunction GetZendInfo(){
        $zendInfo= array();
        $zendInfo['ver'] = zend_version()?zend_version():'<font color=red>×</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 color=green>√</font>':'<font color=red>×</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 color=green>√</font>':'<font color=red>×</font>';
        }
        return$zendInfo;
    }
    publicfunction GetIconcube(){
        $str= '<font color=red>×</font>';
        if(extension_loaded('ionCube Loader')){
            $ys= ionCube_Loader_version();
            $gm= '.'.(int)substr($ys, 3, 2);
            $str= $ys.$gm;
        }
        return$str;
    }
    publicfunction CHKModule($cName){
        if(empty($cName))return '錯誤';
        $str= phpversion($cName);
        returnempty($str)?'<font color=red>×</font>':$str;
    }
    publicfunction GetDBVer($dbname){
        if(empty($dbname))return '錯誤';
        switch($dbname) {
            case'mysql':
                if(function_exists("mysql_get_server_info")){
                    $s= @mysql_get_server_info();
                    $s= $s ? '&nbsp; mysql_server 版本:'.$s:'';
                    $c= @mysql_get_client_info();
                    $c= $c ? '&nbsp; mysql_client 版本:'.$c:'';
                    return$s.$c;
                }
                return'';
                break;
            case'sqlite':
                if(extension_loaded('sqlite3')){
                    $sqliteVer= SQLite3::version();
                    $str= '<font color=green>√</font>';
                    $str.= 'SQLite3 Ver'.$sqliteVer['versionString'];
                }else{
                    $str= $this->isfun('sqlite_close');
                    if(strpos($str,'√')!==false){
                        $str.= '&nbsp; 版本:'.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 color="red">×</font>':"<a href='$phpSelf?act=phpinfo' target='_blank'>PHPINFO</a>";
$strcookies= isset($_COOKIE)?'<font color="green">√</font>': '<font color="red">×</font>';
$strsmtp= get_cfg_var("SMTP")?'<font color="green">√</font>': '<font color="red">×</font>';
$smtpadd= get_cfg_var("SMTP")?get_cfg_var("SMTP"):'<font color="red">×</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;
}
 
 
functionmemory_usage() {
    $memory = ( ! function_exists('memory_get_usage')) ?'0' : round(memory_get_usage()/1024/1024, 2).'MB';
    return$memory;
}
// 計時
functionmicrotime_float() {
    $mtime= microtime();
    $mtime= explode(' ',$mtime);
    return$mtime[1] + $mtime[0];
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?=$title?></title>
<meta http-equiv="X-UA-Compatible"content="IE=EmulateIE7"/>
<meta http-equiv="Content-Type"content="text/html; charset=utf-8"/>
<style type="text/css">
<!--
* {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='#CCCCCC')";}
.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 language="JavaScript"type="text/javascript"src="http://lib.sinaapp.com/js/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){getJSONData();});
var OutSpeed2=<?=floor($S->NetWork['OutSpeed'][2]);?>;
var OutSpeed3=<?=floor($S->NetWork['OutSpeed'][3]);?>;
var OutSpeed4=<?=floor($S->NetWork['OutSpeed'][4]);?>;
var OutSpeed5=<?=floor($S->NetWork['OutSpeed'][5]);?>;
var InputSpeed2=<?=floor($S->NetWork['InputSpeed'][2]);?>;
var InputSpeed3=<?=floor($S->NetWork['InputSpeed'][3]);?>;
var InputSpeed4=<?=floor($S->NetWork['InputSpeed'][4]);?>;
var InputSpeed5=<?=floor($S->NetWork['InputSpeed'][5]);?>;
functiongetJSONData(){
    setTimeout("getJSONData()", 1000);
    $.getJSON('?act=rt&callback=?', displayData);
}
functionForDight(Dight,How){
  if(Dight<0){
    varLast=0+"B/s";
  }elseif (Dight<1024){
    varLast=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"B/s";
  }elseif (Dight<1048576){
    Dight=Dight/1024;
    varLast=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"K/s";
  }else{
    Dight=Dight/1048576;
    varLast=Math.round(Dight*Math.pow(10,How))/Math.pow(10,How)+"M/s";
  }
    returnLast;
}
functiondisplayData(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>
</head>
<body>
<a name="j_top"></a>
<div id="page">
    <divclass="j_top"><a href="#j_php">PHP參數</a>
        <a href="#j_module">組件支持</a>
        <a href="#j_module_other">第三方組件</a>
        <a href="#j_db">數據庫支持</a>
        <a href="#j_performance">性能檢測</a>
        <a href="#j_networkspeed">網速檢測</a>
        <a href="#j_MySQL">MySQL檢測</a>
        <a href="#j_function">函數檢測</a>
        <a href="#j_mail">郵件檢測</a>
    </div>
    <!--Server info-->
    <divclass="con">
        <divclass="j_top">服務器參數</div>
        <divclass="j_tb"><labelclass="j_td j_td_t">服務器域名/IP地址</label><label><?=$S->S['DomainIP'];?></label></div>
        <divclass="j_tb"><labelclass="j_td j_td_t">服務器標識</label><label><?=$S->S['Flag'];?></label></div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器操作系統</label><labelclass="j_td"><?=$S->S['OS'];?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器解譯引擎</label><labelclass="j_td"><?=$S->S['WebEngine'];?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器語言</label><labelclass="j_td"><?=$S->S['Language'];?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器端口</label><labelclass="j_td"><?=$S->S['WebPort'];?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器主機名</label><labelclass="j_td"><?=$S->S['Name'];?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">絕對路徑</label><labelclass="j_td"><?=$S->S['WebPath'];?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">管理員郵箱</label><labelclass="j_td"><?=$S->S['Email'];?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">探針路徑</label><labelclass="j_td"><?=$S->S['ProbePath'];?></label></div>
        </div>
    </div>
    <!--Server Real-Time-->
    <divclass="con">
        <divclass="j_top">服務器實時數據</div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器當前時間</label><labelclass="j_td"id="stime"><?=$S->S['sTime'];?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t">服務器已運行時間</label><labelclass="j_td"id="uptime"><?=$S->sysInfo['uptime'];?></label></div>
        </div>
        <divclass="j_tb"><labelclass="j_td j_td_t">CPU型號[<?=$S->sysInfo['cpu']['num'];?>核]</label><label><?=$S->sysInfo['cpu']['model'];?></label></div>
        <divclass="j_tb"><labelclass="j_td j_td_t">CPU使用情況</label><label id="cpuuse"><?=$S->CPU_Use;?></label></div>
        <divclass="j_tb"><labelclass="j_td j_td_t">硬盤使用狀況</label>
            <label>總空間 <?=$S->hd['t'];?>&nbsp;G,已用 <font color='#333333'><span id="useSpace"><?=$S->hd['u'];?></span></font>&nbsp;G,
                空閒 <font color='#333333'><span id="freeSpace"><?=$S->hd['f'];?></span></font>&nbsp;G,
                使用率 <span id="hdPercent"><?=$S->hd['PCT'];?></span>%
                <divclass="bar"><div id="barhdPercent"class="barli_black"style="width:<?=$S->hd['PCT']?>%">&nbsp;</div> </div>
            </label>
        </div>
        <divclass="j_tb"><labelclass="j_td j_td_t">內存使用狀況</label>
            <labelclass="j_td">物理內存:共<font color='#CC0000'><?=$S->sysInfo['memTotal'];?> </font>
                , 已用<font color='#CC0000'><span id="UsedMemory"><?=$S->sysInfo['memUsed']?></span></font>
                , 空閒<font color='#CC0000'><span id="FreeMemory"><?=$S->sysInfo['memFree'];?></span></font>
                , 使用率<span id="memPercent"><?=$S->sysInfo['memPercent'];?></span>
                <divclass="bar"><div id="barmemPercent"class="barli_red"style="width:<?=$S->sysInfo['memPercent'];?>%">&nbsp;</div></div>
            <?if($S->sysInfo['memCached']){?>
                Cache化內存爲 <span id="CachedMemory"><?=$S->sysInfo['memCached'];?></span>
                , 使用率<span id="memCachedPercent"><?=$S->sysInfo['memCachedPercent'];?></span>% |
                Buffers緩衝爲  <span id="Buffers"><?=$S->sysInfo['memBuffers'];?></span>
                <divclass="bar"><div id="barmemCachedPercent"class="barli_blue"style="width:<?=$S->sysInfo['memCachedPercent'];?>%">&nbsp;</div></div>
                真實內存使用<span id="memRealUsed"><?=$S->sysInfo['memRealUsed'];?></span>
                , 真實內存空閒<span id="memRealFree"><?=$S->sysInfo['memRealFree'];?></span>
                , 使用率<span id="memRealPercent"><?=$S->sysInfo['memRealPercent'];?></span>%
                <divclass="bar_1"><div id="barmemRealPercent"class="barli_1"style="width:<?=$S->sysInfo['memRealPercent'];?>%">&nbsp;</div></div>
            <?}?>
            <?if ($S->sysInfo['swapTotal']) {?>
                SWAP區:共<?=$S->sysInfo['swapTotal'];?>
                , 已使用<span id="swapUsed"><?=$S->sysInfo['swapUsed'];?></span>
                , 空閒<span id="swapFree"><?=$S->sysInfo['swapFree'];?></span>
                , 使用率<span id="swapPercent"><?=$S->sysInfo['swapPercent'];?></span>%
                <divclass="bar"><div id="barswapPercent"class="barli_red"style="width:<?=$S->sysInfo['swapPercent'];?>%">&nbsp;</div> </div>
            <?}?>
            </label>
        </div>
        <divclass="j_tb"><labelclass="j_td j_td_t">系統平均負載</label><labelclass="j_td"><?=$S->sysInfo['loadAvg']?></label></div>
    </div>
    <!--net work-->
    <divclass="con">
        <divclass="j_top">網絡使用狀況</div>
        <?
            $netnum= count($S->NetWork);
            for($i=2;$i < $netnum;$i++) { ?>
                <divclass="j_tb">
                    <labelclass="j_td"style="width:13%"><?=$S->NetWork['NetWorkName'][$i]?></label>
                    <labelclass="j_td"style="width:29%">入網:<font color='#CC0000'><span id="NetInput<?=$i;?>"><?=$S->NetWork['NetInput'][$i];?></span></font></label>
                    <labelclass="j_td"style="width:14%">實時:<font color='#CC0000'><span id="NetInputSpeed<?=$i;?>">0B/s</span></font></label>
                    <labelclass="j_td"style="width:29%">出網: <font color='#CC0000'><span id="NetOut<?=$i?>"><?=$S->NetWork['NetOut'][$i];?></span></font></label>
                    <labelclass="j_td"style="width:14%">實時: <font color='#CC0000'><span id="NetOutSpeed<?=$i?>">0B/s</span></font></label>
                </div>
        <?}?>
    </div>
    <!--enbale module-->
    <divclass="con">
        <divclass="j_top">PHP已編譯模塊檢測</div>
        <divclass="j_tb"><labelclass="j_td j_td_t"><?=$S->phpexts();?></label></div>
    </div>
    <!--enbale module-->
    <a name="j_php"></a>
    <divclass="con">
        <divclass="j_top">PHP相關參數</div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PHP信息(phpinfo):</label><labelclass="j_td"><?=$disFuns;?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PHP版本(php_version):</label><labelclass="j_td"><?=PHP_VERSION;?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PHP運行方式:</label><labelclass="j_td"><?=strtoupper(php_sapi_name());?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">腳本佔用最大內存(memory_limit):</label><labelclass="j_td"><?=$S::show("memory_limit");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PHP安全模式(safe_mode):</label><labelclass="j_td"><?=$S::show("safe_mode");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">POST方法提交最大限制(post_max_size):</label><labelclass="j_td"><?=$S::show("post_max_size");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">上傳文件最大限制(upload_max_filesize):</label><labelclass="j_td"><?=$S::show("upload_max_filesize");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">浮點型數據顯示的有效位數(precision):</label><labelclass="j_td"><?=$S::show("precision");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">腳本超時時間(max_execution_time):</label><labelclass="j_td"><?=$S::show("max_execution_time");?>秒</label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">socket超時時間(default_socket_timeout):</label><labelclass="j_td"><?=$S::show("default_socket_timeout");?>秒</label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PHP頁面根目錄(doc_root):</label><labelclass="j_td"><?=$S::show("doc_root");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">用戶根目錄(user_dir):</label><labelclass="j_td"><?=$S::show("user_dir");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">dl()函數(enable_dl):</label><labelclass="j_td"><?=$S::show("enable_dl");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">指定包含文件目錄(include_path):</label><labelclass="j_td"><?=$S::show("include_path");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">顯示錯誤信息(display_errors):</label><labelclass="j_td"><?=$S::show("display_errors");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">自定義全局變量(register_globals):</label><labelclass="j_td"><?=$S::show("register_globals");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">數據反斜槓轉義(magic_quotes_gpc):</label><labelclass="j_td"><?=$S::show("magic_quotes_gpc");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">"&lt;?...?&gt;"短標籤(short_open_tag):</label><labelclass="j_td"><?=$S::show("short_open_tag");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">"&lt;% %&gt;"ASP風格標記(asp_tags):</label><labelclass="j_td"><?=$S::show("asp_tags");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">忽略重複錯誤信息(ignore_repeated_errors):</label><labelclass="j_td"><?=$S::show("ignore_repeated_errors");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">忽略重複的錯誤源(ignore_repeated_source):</label><labelclass="j_td"><?=$S::show("ignore_repeated_source");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">報告內存泄漏(report_memleaks):</label><labelclass="j_td"><?=$S::show("report_memleaks");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">自動字符串轉義(magic_quotes_gpc):</label><labelclass="j_td"><?=$S::show("magic_quotes_gpc");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">外部字符串自動轉義(magic_quotes_runtime):</label><labelclass="j_td"><?=$S::show("magic_quotes_runtime");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">打開遠程文件(allow_url_fopen):</label><labelclass="j_td"><?=$S::show("allow_url_fopen");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">聲明argv和argc變量(register_argc_argv):</label><labelclass="j_td"><?=$S::show("register_argc_argv");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Cookie 支持:</label><labelclass="j_td"><?=$strcookies;?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">拼寫檢查(ASpell Library):</label><labelclass="j_td"><?=$S::isfun("aspell_check_raw");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">高精度數學運算(BCMath):</label><labelclass="j_td"><?=$S::isfun("bcadd");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PREL相容語法(PCRE):</label><labelclass="j_td"><?=$S::isfun("preg_match");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">PDF文檔支持:</label><labelclass="j_td"><?=$S::isfun("pdf_close");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">SNMP網絡管理協議:</label><labelclass="j_td"><?=$S::isfun("snmpget");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">VMailMgr郵件處理:</label><labelclass="j_td"><?=$S::isfun("vm_adduser");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Curl支持:</label><labelclass="j_td"><?=$S::isfun("curl_init");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">SMTP支持:</label><labelclass="j_td"><?=$strsmtp;?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">SMTP地址:</label><labelclass="j_td"><?=$smtpadd;?></label></div>
        </div>
        <divclass="j_tb">
            <labelclass="j_td j_td_t1">默認支持函數(enable_functions):</label><labelclass="j_td"><a href='<?=$phpSelf;?>?act=Function'target='_blank' class='static'>請點這裏查看詳細!</a></label>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">被禁用的函數(disable_functions):</label><labelclass="j_td"><?=$S::GetDisFuns();?></label></div>
        </div>
    </div>
    <!--組件支持-->
    <a name="j_module"></a>
    <divclass="con">
        <divclass="j_top">組件支持</div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">FTP支持:</label><labelclass="j_td"><?=$S::isfun("ftp_login");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">XML解析支持:</label><labelclass="j_td"><?=$S::isfun("xml_set_object");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Session支持:</label><labelclass="j_td"><?=$S::isfun("session_start");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Socket支持:</label><labelclass="j_td"><?=$S::isfun("socket_accept");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Calendar支持</label><labelclass="j_td"><?=$S::isfun('cal_days_in_month');?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">允許URL打開文件:</label><labelclass="j_td"><?=$S::show("allow_url_fopen");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">GD庫支持:</label><labelclass="j_td"><?=$S::GetGDVer();?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">壓縮文件支持(Zlib):</label><labelclass="j_td"><?=$S::isfun("gzclose");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">IMAP電子郵件系統函數庫:</label><labelclass="j_td"><?=$S::isfun("imap_close");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">曆法運算函數庫:</label><labelclass="j_td"><?=$S::isfun("JDToGregorian");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">正則表達式函數庫:</label><labelclass="j_td"><?=$S::isfun("preg_match");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">WDDX支持:</label><labelclass="j_td"><?=$S::isfun("wddx_add_vars");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Iconv編碼轉換:</label><labelclass="j_td"><?=$S::isfun("iconv");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">mbstring:</label><labelclass="j_td"><?=$S::isfun("mb_eregi");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">高精度數學運算:</label><labelclass="j_td"><?=$S::isfun("bcadd");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">LDAP目錄協議:</label><labelclass="j_td"><?=$S::isfun("ldap_close");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">MCrypt加密處理:</label><labelclass="j_td"><?=$S::isfun("mcrypt_cbc");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">哈稀計算:</label><labelclass="j_td"><?=$S::isfun("mhash_count");?></label></div>
        </div>
    </div>
    <a name="j_module_other"></a>
    <!--第三方組件信息-->
    <divclass="con">
        <divclass="j_top">第三方組件</div>
        <divclass="j_tb"><?$zendInfo= $S::GetZendInfo();?>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Zend版本</label><labelclass="j_td"><?=$zendInfo['ver'];?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1"><?=$zendInfo['loader']?></label><labelclass="j_td"><?=$zendInfo['html'];?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">eAccelerator</label><labelclass="j_td"><?=$S->CHKModule('eAccelerator');?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">ioncube</label><labelclass="j_td"><?=$S->GetIconcube();?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">XCache</label><labelclass="j_td"><?=$S->CHKModule('XCache');?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">APC</label><labelclass="j_td"><?=$S->CHKModule('APC');?></label></div>
        </div>
    </div>
    <a name="w_db"></a>
    <!--db-->
    <divclass="con">
        <divclass="j_top">數據庫支持</div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">MySQL 數據庫:</label><labelclass="j_td"><?=$S::isfun('mysql_close').$S::GetDBVer('mysql');?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">ODBC 數據庫:</label><labelclass="j_td"><?=$S::isfun("odbc_close");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Oracle 數據庫:</label><labelclass="j_td"><?=$S::isfun("ora_close");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">SQL Server 數據庫:</label><labelclass="j_td"><?$S::isfun("mssql_close");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">dBASE 數據庫:</label><labelclass="j_td"><?=$S::isfun("dbase_close");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">mSQL 數據庫:</label><labelclass="j_td"><?=$S::isfun("msql_close");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">SQLite 數據庫:</label><labelclass="j_td"><?=$S->GetDBVer('sqlite');?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Hyperwave 數據庫:</label><labelclass="j_td"><?=$S::isfun("hw_close");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Postgre SQL 數據庫:</label><labelclass="j_td"><?=$S::isfun("pg_close"); ?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">Informix 數據庫:</label><labelclass="j_td"><?=$S::isfun("ifx_close");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">DBA 數據庫:</label><labelclass="j_td"><?=$S::isfun("dba_close");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">DBM 數據庫:</label><labelclass="j_td"><?=$S::isfun("dbmclose");?></label></div>
        </div>
        <divclass="j_tb">
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">FilePro 數據庫:</label><labelclass="j_td"><?=$S::isfun("filepro_fieldcount");?></label></div>
            <divclass="j_td"style="width: 50%"><labelclass="j_td j_td_t1">SyBase 數據庫:</label><labelclass="j_td"><?=$S::isfun("sybase_close");?></label></div>
        </div>
    </div>
 
    <divclass="con">
        <div align="center"><?php$run_time = sprintf('%0.4f', microtime_float() -$time_start);?>Processed in <?phpecho $run_time?> seconds. <?phpecho memory_usage();?> memory usage.</div>
    </div>
</div>
 
</body>
</html>

發佈了272 篇原創文章 · 獲贊 236 · 訪問量 236萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章