<table cellspacing="1" cellpadding="3" width="90%" align="center" bgcolor="#ffffff"
                border="0">
                <tbody>
                    <tr>
                        <td class="th1" align="center" colspan="2" height="25">
                            服务器信息统计
                        </td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="height: 24px; width: 50%; text-align: left;">
                            &nbsp;<strong>服务器名</strong>:<%=System.Environment.MachineName%></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 24px; text-align: left;">
                            &nbsp;<b>服务器端口:</b><%= HttpContext.Current.Request.ServerVariables["Server_Port"].ToString() %></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="height: 23px; width: 50%; text-align: left;">
                            &nbsp;<b>脚本解释引擎:</b><%=System.Environment.Version%></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 23px; text-align: left;">
                            <b>&nbsp;站点物理路径:</b><%=HttpContext.Current.Request.PhysicalApplicationPath.ToString() %></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="height: 23px; width: 50%; text-align: left;">
                            &nbsp;<b>服务器CPU个数:</b><%=System.Environment.ProcessorCount %>
                        </td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 23px; text-align: left;">
                            &nbsp;<b>服务器IIS版本:</b><%=Request.ServerVariables["SERVER_SOFTWARE"]%></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td style="width: 50%; height: 23px; text-align: left;">
                            &nbsp;<b>开机运行时长</b>:<%=(System.Environment.TickCount/3600000).ToString("N2")%>
                            小时
                        </td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 25px; text-align: left;">
                            <b>&nbsp;服务器时间:</b><%=DateTime.Now.ToString() %></td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td width="50%" style="height: 23px; text-align: left;">
                            <b>&nbsp;服务器变量:</b>Session(<%=Session.Contents.Count%>) Application(<%
                                                                                                    if (Application.Contents.Count > 2)
                                                                                                    {
                                                                                                        Response.Write(Application.Contents.Count - 2);
                                                                                                    }
                                                                                                    else
                                                                                                    {
                                                                                                        Response.Write(Application.Contents.Count);
                                                                                                    }
                            %>)</td>
                    </tr>
                    <tr bgcolor="#f9fbf0">
                        <td colspan="2" style="height: 23px; text-align: left;">
                            &nbsp;<b>服务器操作系统:</b><span>
                                <%=System.Environment.OSVersion.ToString()%>
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>

posted on 2010-11-09 15:59  〤‵坠落者...  阅读(382)  评论(0编辑  收藏  举报