PHP获取服务器端信息函数
-
-
-
-
-
- function getSystemInfo()
- {
- $systemInfo = array();
-
-
- $systemInfo['os'] = PHP_OS;
-
-
- $systemInfo['phpversion'] = PHP_VERSION;
-
-
- $systemInfo['apacheversion'] = apache_get_version();
-
-
- $systemInfo['zendversion'] = zend_version();
-
-
- if (function_exists('gd_info'))
- {
- $gdInfo = gd_info();
- $systemInfo['gdsupport'] = true;
- $systemInfo['gdversion'] = $gdInfo['GD Version'];
- }
- else
- {
- $systemInfo['gdsupport'] = false;
- $systemInfo['gdversion'] = '';
- }
-
-
- $systemInfo['safemode'] = ini_get('safe_mode');
-
-
- $systemInfo['registerglobals'] = ini_get('register_globals');
-
-
- $systemInfo['magicquotes'] = (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc());
-
-
- $systemInfo['maxuploadfile'] = ini_get('upload_max_filesize');
-
-
- $systemInfo['memorylimit'] = get_cfg_var("memory_limit") ? get_cfg_var("memory_limit") : '-';
-
- return $systemInfo;
- }
|