php 针探,查看服务器详细信息
一、本程序基于div+css,新型架构php探针,免费开源的自由软件,功能强大,结构清晰,使用方便.
1.支持windows,linux,unix,freebsd,sun solar系统
2.支持ie6,ie7,firefox,google chrome等浏览器
二、主要用途及适用对象:
1.熟悉php编程的业余爱好者及专业开发人员
2.机房管理人员配置linux(windows)+php+mysql教程+zend系统环境,检测系统是否配置成功.
3.对于购买虚拟主机的用户,用于测试服务器性能.
以下两变量可以修改配制,如果这个探针你是用来验示的,你可以在下面变量中输入相关信息,会显示在页面底部.
php 针探代码如下:
- header("content-type: text/html; charset=utf-8");
- error_reporting(e_error | e_warning | e_parse);
- ob_start();
-
- $valint = (false == emptyempty($_post['pint']))?$_post['pint']:"未测试";
- $valfloat = (false == emptyempty($_post['pfloat']))?$_post['pfloat']:"未测试";
- $valio = (false == emptyempty($_post['pio']))?$_post['pio']:"未测试";
- $mysqlreshow = "none";
- $mailreshow = "none";
- $funreshow = "none";
- $opreshow = "none";
- $sysreshow = "none";
-
-
-
- define("yes", "<span class='resyes'>√</span>");
- define("no", "<span class='resno'>×</span>");
-
-
- define("icon", "<span class='icon'>2</span> ");
- $phps教程elf = $_server[php_self] ? $_server[php_self] : $_server[script_name];
- define("phpself", preg_replace("/(.{0,}?/+)/", "", $phpself));
-
- if ($_get['act'] == "phpinfo")
- {
- phpinfo();
- exit();
- }
- elseif($_post['act'] == "整型测试")
- {
- $valint = test_int();
- }
- elseif($_post['act'] == "浮点测试")
- {
- $valfloat = test_float();
- }
- elseif($_post['act'] == "io测试")
- {
- $valio = test_io();
- }
- elseif($_post['act'] == "connect")
- {
- $mysqlreshow = "show";
- $mysqlre = "mysql连接测试结果:";
- $mysqlre .= (false !== @mysql_connect($_post['mysqlhost'], $_post['mysqluser'], $_post['mysqlpassword']))?"mysql服务器连接正常, ":"mysql服务器连接失败, ";
- $mysqlre .= "数据库教程 <b>".$_post['mysqldb']."</b> ";
- $mysqlre .= (false != @mysql_select_db($_post['mysqldb']))?"连接正常":"连接失败";
- }
- elseif($_post['act'] == "sendmail")
- {
- $mailreshow = "show";
- $mailre = "mail邮件发送测试结果:发送";
- $mailre .= (false !== @mail($_post["mailreceiver"], "uenuprobe mail server test.", "this email is sent by uenuprobe. copyright uenucom http://www.uenu.com"))?"完成":"失败";
- }
- elseif($_post['act'] == "function_check")
- {
- $funreshow = "show";
- $funre = "函数 <b>".$_post['funname']."</b> 支持状况检测结果:".isfun($_post['funname']);
- }
- elseif($_post['act'] == "configuration_check")
- {
- $opreshow = "show";
- $opre = "配置参数 <b>".$_post['opname']."</b> 检测结果:".getcon($_post['opname']);
- }
-
-
-
-
- switch (php_os)
- {
- case "linux":
- $sysreshow = (false != ($sysinfo = sys_linux()))?"show":"none";
- break;
- case "freebsd":
- $sysreshow = (false != ($sysinfo = sys_freebsd()))?"show":"none";
- break;
- case "windows":
-
- $sysinfo['uptime'] ="对不起windows系统不支持";
- break;
- default:
- break;
- }
-
-
-
- ?>
- <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link type="text/css" rel="stylesheet" href="common/control.css">
- <script type="text/网页特效" language="javascript" src="common/admin.otable.js"></script>
- <script type="text/javascript" language="javascript" src="common/include.func.js"></script>
- <title>服务器信息</title>
- <style type="text/css">
- .resyes {
- font-size: 12px;
- color: #090;
- font-weight:bold;
- font-family: verdana;
- }
- .resno {
- font-size: 12px;
- color: #f00;
- font-weight:bold;
- font-family: verdana;
- }
- .check00{
- color: #630;
- }
- </style>
- <script type="text/javascript">
- window.onload=function(){
- var otable=document.getelementbyid("otable");
- for(var i=0;i<otable.rows.length;i++){
- if(i%2==0)
- otable.rows[i].classname="altrow";
- }
-
- var otable2=document.getelementbyid("otable2");
- for(var i=0;i<otable2.rows.length;i++){
- if(i%2==0)
- otable2.rows[i].classname="altrow";
- }
-
- var otable3=document.getelementbyid("otable3");
- for(var i=0;i<otable3.rows.length;i++){
- if(i%2==0)
- otable3.rows[i].classname="altrow";
- }
-
- var otable4=document.getelementbyid("otable4");
- for(var i=0;i<otable4.rows.length;i++){
- if(i%2==0)
- otable4.rows[i].classname="altrow";
- }
-
- var otable5=document.getelementbyid("otable5");
- for(var i=0;i<otable5.rows.length;i++){
- if(i%2==0)
- otable5.rows[i].classname="altrow";
- }
- }
- </script>
- </head>
-
- <body class