<?php
class Serverinfo {
	public function __construct(){
		$this->serverinfo['sapi']=php_sapi_name();
		$this->serverinfo['mysql']=mysql_get_server_info();
		$this->serverinfo['os']=PHP_OS;
		$this->serverinfo['apache']=apache_get_version();
		$this->serverinfo['zend']=zend_version();
		if(function_exists('gd_info')){
			$gdinfo=gd_info();
			$this->serverinfo['gd']=$gdinfo['GD Version'];
		}else{
			$this->serverinfo['gd']='没有开启GD库';
		}
	}
	public function getserverinfo(){
		return $this->serverinfo;
	}
}










