不同的用户权限看到的菜单功能都不同,登录后的初始还原页不配权限,保证每个用户都能看到,常见的做法有,放系统信息,统计信息等
public function get_sys_info() {$sys_info['os'] = PHP_OS;$sys_info['zlib'] = function_exists('gzclose') ? 'YES' : 'NO'; //zlib$sys_info['safe_mode'] = (boolean)ini_get('safe_mode') ? 'YES' : 'NO'; //safe_mode = Off$sys_info['timezone'] = function_exists("date_default_timezone_get") ? date_default_timezone_get() : "no_timezone";$sys_info['curl'] = function_exists('curl_init') ? 'YES' : 'NO';$sys_info['web_server'] = $_SERVER['SERVER_SOFTWARE'];$sys_info['php_version'] = phpversion();$sys_info['ip'] = gethostbyname($_SERVER['SERVER_NAME']);$sys_info['fileupload'] = @ini_get('file_uploads') ? ini_get('upload_max_filesize') : 'unknown';$sys_info['max_ex_time'] = @ini_get("max_execution_time") . 's'; //脚本最大执行时间$sys_info['set_time_limit'] = function_exists("set_time_limit") ? true : false;$sys_info['domain'] = $_SERVER['HTTP_HOST'];$sys_info['memory_limit'] = ini_get('memory_limit');$sys_info['soft_version'] = '2.0.7'; //系统版本$mysqlinfo = Db::query("SELECT VERSION() as version");$sys_info['mysql_version'] = $mysqlinfo[0]['version'];if (function_exists("gd_info")) {$gd = gd_info();$sys_info['gdinfo'] = $gd['GD Version'];} else {$sys_info['gdinfo'] = "未知";}return $sys_info;
}