echo "<a class='menuitem' id='menu" . $GLOBALS['module'][$k]['id'] . "' href='#!" . $GLOBALS['module'][$k]['id'] . "'>" . $GLOBALS['module'][$k]['title'] . "</a>";
}
?>
		</div>
		<!--menu end-->

	</div>
	<!--header end-->

	<!--content start-->
	<div id='content'>
		<!--server info start-->
		<div id='basicInfo'>
			<?php 
echo $error_html;
foreach (get_server_info() as $k => $v) {
    echo "<div>" . $v . "</div>";
}
?>
		</div>
		<!--server info end-->

		<?php 
foreach ($GLOBALS['module_to_load'] as $k) {
    $content = $GLOBALS['module'][$k]['content'];
    echo "<div class='menucontent' id='" . $GLOBALS['module'][$k]['id'] . "'>" . $content . "</div>";
}
?>
	</div>
	<!--content end-->
 public function bugsHandle()
 {
     $post_info = I('post.');
     $server_info = get_server_info();
     $post_info['server_info'] = $server_info;
     dump($post_info);
     echo json_encode($post_info);
 }
 function getDatabaseVersion()
 {
     if ($this->getDatabaseType() == 'postgresql') {
         $version = @pg_version();
         if ($version == FALSE) {
             //No connection
             return NULL;
         } else {
             return $version['server'];
         }
     } elseif ($this->getDatabaseType() == 'mysqlt' or $this->getDatabaseType() == 'mysqli') {
         $version = @get_server_info();
         return $version;
     }
     return FALSE;
 }
Exemple #4
0
/*
 * 解析当前请求URL和服务器参数
 * 使用全局变量:$server_config
 */
if (!function_exists('get_server_info')) {
    function get_server_info()
    {
        global $server_config;
        if (isset($_SERVER)) {
            $server_config = array('server_ip' => $_SERVER['SERVER_ADDR'], 'remote_ip' => $_SERVER['REMOTE_ADDR'], 'server_port' => $_SERVER['SERVER_PORT'], 'remote_port' => $_SERVER['REMOTE_PORT'], 'server_name' => $_SERVER['SERVER_NAME'], 'server_root' => $_SERVER['DOCUMENT_ROOT']);
        }
    }
    /*
     * 执行函数
     */
    get_server_info();
}
/*
 * 显示错误信息,并终止系统运行
 */
if (!function_exists('show_error')) {
    function show_error($message, $status_code = 500, $heading = 'An Error Was Encountered')
    {
        $message = '<p style="color:red">' . implode('</p><p>', !is_array($message) ? array($message) : $message) . '</p>';
        echo $message;
        exit;
    }
}
/*
 * 转换gdk为UTF-8
 */