1 <?php
2
3 error_reporting(0); //抑制所有错误信息
4 @header("content-Type: text/html; charset=utf-8"); //语言强制
5 ob_start();
6
7 function valid_email($str)
8 {
9 return ( ! preg_match("/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/ix", $str)) ? FALSE : TRUE;
10 }
11
12 //检测PHP设置参数
13 function show($varName)
14 {
15 switch($result = get_cfg_var($varName))
16 {
17 case 0:
18 return '<font color="red">×</font>';
19 break;
20
21 case 1:
22 return '<font color="green">√</font>';
23 break;
24
25 default:
26 return $result;
27 break;
28 }
29 }
30
31
32 if ($_GET['act'] == "phpinfo")
33 {
34 phpinfo();
35 exit();
36 }
37 elseif($_GET['act'] == "Function")
38 {
39 $arr = get_defined_functions();
40 Function php()
41 {
42 }
43 echo "<pre>";
44 Echo "这里显示系统所支持的所有函数,和自定义函数\n";
45 print_r($arr);
46 echo "</pre>";
47 exit();
48 }elseif($_GET['act'] == "disable_functions")
49 {
50 $disFuns=get_cfg_var("disable_functions");
51 if(empty($disFuns))
52 {
53 $arr = '<font color=red>×</font>';
54 }
55 else
56 {
57 $arr = $disFuns;
58 }
59 Function php()
60 {
61 }
62 echo "<pre>";
63 Echo "这里显示系统被禁用的函数\n";
64 print_r($arr);
65 echo "</pre>";
66 exit();
67 }
68
69 //MySQL检测
70 if ($_POST['act'] == 'MySQL检测')
71 {
72 $host = isset($_POST['host']) ? trim($_POST['host']) : '';
73 $port = isset($_POST['port']) ? (int) $_POST['port'] : '';
74 $login = isset($_POST['login']) ? trim($_POST['login']) : '';
75 $password = isset($_POST['password']) ? trim($_POST['password']) : '';
76 $host = preg_match('~[^a-z0-9\-\.]+~i', $host) ? '' : $host;
77 $port = intval($port) ? intval($port) : '';
78 $login = preg_match('~[^a-z0-9\_\-]+~i', $login) ? '' : htmlspecialchars($login);
79 $password = is_string($password) ? htmlspecialchars($password) : '';
80 }
81 elseif ($_POST['act'] == '函数检测')
82 {
83 $funRe = "函数".$_POST['funName']."支持状况检测结果:".isfun1($_POST['funName']);
84 }
85 elseif ($_POST['act'] == '邮件检测')
86 {
87 $mailRe = "邮件发送检测结果:发送";
88 if($_SERVER['SERVER_PORT']==80){$mailContent = "http://".$_SERVER['SERVER_NAME'].($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);}
89 else{$mailContent = "http://".$_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT'].($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);}
90 $mailRe .= (false !== @mail($_POST["mailAdd"], $mailContent, "This is a test mail!\n\nhttp://lnmp.org")) ? "完成":"失败";
91 }
92
93 // 检测函数支持
94 function isfun($funName = '')
95 {
96 if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName, $tmp)) return '错误';
97 return (false !== function_exists($funName)) ? '<font color="green">√</font>' : '<font color="red">×</font>';
98 }
99 function isfun1($funName = '')
100 {
101 if (!$funName || trim($funName) == '' || preg_match('~[^a-z0-9\_]+~i', $funName, $tmp)) return '错误';
102 return (false !== function_exists($funName)) ? '√' : '×';
103 }
104
105 ?>
106
107 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
108 <html xmlns="http://www.w3.org/1999/xhtml">
109 <head>
110 <title>phpStudy 探针 2014 </title>
111 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
112 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
113
114 <style type="text/css">
115 <!--
116 * {font-family: Tahoma, "Microsoft Yahei", Arial; }
117 body{text-align: center; margin: 0 auto; padding: 0; background-color:#FFFFFF;font-size:12px;font-family:Tahoma, Arial}
118 h1 {font-size: 26px; font-weight: normal; padding: 0; margin: 0; color: #444444;}
119 h1 small {font-size: 11px; font-family: Tahoma; font-weight: bold; }
120 a{color: #000000; text-decoration:none;}
121 a.black{color: #000000; text-decoration:none;}
122 b{color: #999999;}
123 table{clear:both;padding: 0; margin: 0 0 10px;border-collapse:collapse; border-spacing: 0;}
124 th{padding: 3px 6px; font-weight:bold;background:#3066a6;color:#FFFFFF;border:1px solid #3066a6; text-align:left;}
125 .th_1{padding: 3px 6px; font-weight:bold;background:#666699;color:#FFFFFF;border:1px solid #3066a6; text-align:left;}
126
127 tr{padding: 0; background:#F7F7F7;}
128 td{padding: 3px 6px; border:1px solid #CCCCCC;}
129 input{padding: 2px; background: #FFFFFF; border-top:1px solid #666666; border-left:1px solid #666666; border-right:1px solid #CCCCCC; border-bottom:1px solid #CCCCCC; font-size:12px}
130 input.btn{font-weight: bold; height: 20px; line-height: 20px; padding: 0 6px; color:#666666; background: #f2f2f2; border:1px solid #999;font-size:12px}
131 .bar {border:1px solid #999999; background:#FFFFFF; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px;overflow: hidden;}
132 .bar_1 {border:1px dotted #999999; background:#FFFFFF; height:5px; font-size:2px; width:89%; margin:2px 0 5px 0;padding:1px;overflow: hidden;}
133 .barli_red{background:#ff6600; height:5px; margin:0px; padding:0;}
134 .barli_blue{background:#0099FF; height:5px; margin:0px; padding:0;}
135 .barli_green{background:#36b52a; height:5px; margin:0px; padding:0;}
136 .barli_1{background:#999999; height:5px; margin:0px; padding:0;}
137 .barli{background:#36b52a; height:5px; margin:0px; padding:0;}
138 #page {width: 920px; padding: 0 20px; margin: 0 auto; text-align: left;}
139 #header{position: relative; padding: 10px;}
140 #footer {padding: 15px 15px; text-align: left; font-size: 12px; font-family: Tahoma, Verdana;line-height:16px}
141 #lnmplink {position: absolute; top: 20px; left: 200px; text-align: right; font-weight: bold; color: #06C;}
142 #lnmplink a {color: #0000FF; text-decoration: underline;}
143 #lnmplink2 {position: absolute; top: 20px; right: 80px; text-align: right; font-weight: bold; color: #06C;}
144 #lnmplink2 a {color: #0000FF; text-decoration: underline;}
145 .w_small{font-family: Courier New;}
146 .w_number{color: #f800fe;}
147 .sudu {padding: 0; background:#5dafd1; }
148 .suduk { margin:0px; padding:0;}
149 .resNo{color: #FF0000;}
150 .word{word-break:break-all;}
151 -->
152 </style>
153
154 </head>
155 <body>
156
157 <div id="page">
158 <div id="header">
159 <h1>phpStudy 探针</h1>
160 <div id="lnmplink">for <a href="http://www.phpstudy.net/" target="_blank">phpStudy 2014</a></div>
161 <div id="lnmplink2">not <a href="http://www.phpstudy.net/a.php/192.html" target="_blank">不想显示 phpStudy 探针</a></div>
162 </div>
163
164 <!--服务器相关参数-->
165 <table width="100%" cellpadding="3" cellspacing="0">
166 <tr><th colspan="4">服务器参数</th></tr>
167 <tr>
168 <td>服务器域名/IP地址</td>
169 <td colspan="3"><?php echo $_SERVER['SERVER_NAME'];?>(<?php if('/'==DIRECTORY_SEPARATOR){echo $_SERVER['SERVER_ADDR'];}else{echo @gethostbyname($_SERVER['SERVER_NAME']);} ?>)</td>
170 </tr>
171 <tr>
172 <td>服务器标识</td>
173 <td colspan="3"><?php if($sysInfo['win_n'] != ''){echo $sysInfo['win_n'];}else{echo @php_uname();};?></td>
174 </tr>
175 <tr>
176 <td width="13%">服务器操作系统</td>
177 <td width="37%"><?php $os = explode(" ", php_uname()); echo $os[0];?> 内核版本:<?php if('/'==DIRECTORY_SEPARATOR){echo $os[2];}else{echo $os[1];} ?></td>
178 <td width="13%">服务器解译引擎</td>
179 <td width="37%"><?php echo $_SERVER['SERVER_SOFTWARE'];?></td>
180 </tr>
181 <tr>
182 <td>服务器语言</td>
183 <td><?php echo getenv("HTTP_ACCEPT_LANGUAGE");?></td>
184 <td>服务器端口</td>
185 <td><?php echo $_SERVER['SERVER_PORT'];?></td>
186 </tr>
187 <tr>
188 <td>服务器主机名</td>
189 <td><?php if('/'==DIRECTORY_SEPARATOR ){echo $os[1];}else{echo $os[2];} ?></td>
190 <td>绝对路径</td>
191 <td><?php echo $_SERVER['DOCUMENT_ROOT']?str_replace('\\','/',$_SERVER['DOCUMENT_ROOT']):str_replace('\\','/',dirname(__FILE__));?></td>
192 </tr>
193 <tr>
194 <td>管理员邮箱</td>
195 <td><?php echo $_SERVER['SERVER_ADMIN'];?></td>
196 <td>探针路径</td>
197 <td><?php echo str_replace('\\','/',__FILE__)?str_replace('\\','/',__FILE__):$_SERVER['SCRIPT_FILENAME'];?></td>
198 </tr>
199 </table>
200
201
202
203 <table width="100%" cellpadding="3" cellspacing="0" align="center">
204 <tr>
205 <th colspan="4">PHP已编译模块检测</th>
206 </tr>
207 <tr>
208 <td colspan="4"><span class="w_small">
209 <?php
210 $able=get_loaded_extensions();
211 foreach ($able as $key=>$value) {
212 if ($key!=0 && $key%13==0) {
213 echo '<br />';
214 }
215 echo "$value ";
216 }
217 ?></span>
218 </td>
219 </tr>
220 </table>
221 <table width="100%" cellpadding="3" cellspacing="0" align="center">
222 <tr><th colspan="4">PHP相关参数</th></tr>
223 <tr>
224 <td width="32%">PHP信息(phpinfo):</td>
225 <td width="18%">
226 <?php
227 $phpSelf = $_SERVER[PHP_SELF] ? $_SERVER[PHP_SELF] : $_SERVER[SCRIPT_NAME];
228 $disFuns=get_cfg_var("disable_functions");
229 ?>
230 <?php echo (false!==eregi("phpinfo",$disFuns))? '<font color="red">×</font>' :"<a href='$phpSelf?act=phpinfo' target='_blank'>PHPINFO</a>";?>
231 </td>
232 <td width="32%">PHP版本(php_version):</td>
233 <td width="18%"><?php echo PHP_VERSION;?></td>
234 </tr>
235 <tr>
236 <td>PHP运行方式:</td>
237 <td><?php echo strtoupper(php_sapi_name());?></td>
238 <td>脚本占用最大内存(memory_limit):</td>
239 <td><?php echo show("memory_limit");?></td>
240 </tr>
241 <tr>
242 <td>PHP安全模式(safe_mode):</td>
243 <td><?php echo show("safe_mode");?></td>
244 <td>POST方法提交最大限制(post_max_size):</td>
245 <td><?php echo show("post_max_size");?></td>
246 </tr>
247 <tr>
248 <td>上传文件最大限制(upload_max_filesize):</td>
249 <td><?php echo show("upload_max_filesize");?></td>
250 <td>浮点型数据显示的有效位数(precision):</td>
251 <td><?php echo show("precision");?></td>
252 </tr>
253 <tr>
254 <td>脚本超时时间(max_execution_time):</td>
255 <td><?php echo show("max_execution_time");?>秒</td>
256 <td>socket超时时间(default_socket_timeout):</td>
257 <td><?php echo show("default_socket_timeout");?>秒</td>
258 </tr>
259 <tr>
260 <td>PHP页面根目录(doc_root):</td>
261 <td><?php echo show("doc_root");?></td>
262 <td>用户根目录(user_dir):</td>
263 <td><?php echo show("user_dir");?></td>
264 </tr>
265 <tr>
266 <td>dl()函数(enable_dl):</td>
267 <td><?php echo show("enable_dl");?></td>
268 <td>指定包含文件目录(include_path):</td>
269 <td><?php echo show("include_path");?></td>
270 </tr>
271 <tr>
272 <td>显示错误信息(display_errors):</td>
273 <td><?php echo show("display_errors");?></td>
274 <td>自定义全局变量(register_globals):</td>
275 <td><?php echo show("register_globals");?></td>
276 </tr>
277 <tr>
278 <td>数据反斜杠转义(magic_quotes_gpc):</td>
279 <td><?php echo show("magic_quotes_gpc");?></td>
280 <td>"<?...?>"短标签(short_open_tag):</td>
281 <td><?php echo show("short_open_tag");?></td>
282 </tr>
283 <tr>
284 <td>"<% %>"ASP风格标记(asp_tags):</td>
285 <td><?php echo show("asp_tags");?></td>
286 <td>忽略重复错误信息(ignore_repeated_errors):</td>
287 <td><?php echo show("ignore_repeated_errors");?></td>
288 </tr>
289 <tr>
290 <td>忽略重复的错误源(ignore_repeated_source):</td>
291 <td><?php echo show("ignore_repeated_source");?></td>
292 <td>报告内存泄漏(report_memleaks):</td>
293 <td><?php echo show("report_memleaks");?></td>
294 </tr>
295 <tr>
296 <td>自动字符串转义(magic_quotes_gpc):</td>
297 <td><?php echo show("magic_quotes_gpc");?></td>
298 <td>外部字符串自动转义(magic_quotes_runtime):</td>
299 <td><?php echo show("magic_quotes_runtime");?></td>
300 </tr>
301 <tr>
302 <td>打开远程文件(allow_url_fopen):</td>
303 <td><?php echo show("allow_url_fopen");?></td>
304 <td>声明argv和argc变量(register_argc_argv):</td>
305 <td><?php echo show("register_argc_argv");?></td>
306 </tr>
307 <tr>
308 <td>Cookie 支持:</td>
309 <td><?php echo isset($_COOKIE)?'<font color="green">√</font>' : '<font color="red">×</font>';?></td>
310 <td>拼写检查(ASpell Library):</td>
311 <td><?php echo isfun("aspell_check_raw");?></td>
312 </tr>
313 <tr>
314 <td>高精度数学运算(BCMath):</td>
315 <td><?php echo isfun("bcadd");?></td>
316 <td>PREL相容语法(PCRE):</td>
317 <td><?php echo isfun("preg_match");?></td>
318 <tr>
319 <td>PDF文档支持:</td>
320 <td><?php echo isfun("pdf_close");?></td>
321 <td>SNMP网络管理协议:</td>
322 <td><?php echo isfun("snmpget");?></td>
323 </tr>
324 <tr>
325 <td>VMailMgr邮件处理:</td>
326 <td><?php echo isfun("vm_adduser");?></td>
327 <td>Curl支持:</td>
328 <td><?php echo isfun("curl_init");?></td>
329 </tr>
330 <tr>
331 <td>SMTP支持:</td>
332 <td><?php echo get_cfg_var("SMTP")?'<font color="green">√</font>' : '<font color="red">×</font>';?></td>
333 <td>SMTP地址:</td>
334 <td><?php echo get_cfg_var("SMTP")?get_cfg_var("SMTP"):'<font color="red">×</font>';?></td>
335 </tr>
336 <tr>
337 <td>默认支持函数(enable_functions):</td>
338 <td colspan="3"><a href='<?php echo $phpSelf;?>?act=Function' target='_blank' class='static'>请点这里查看详细!</a></td>
339 </tr>
340 <tr>
341 <td>被禁用的函数(disable_functions):</td>
342 <td colspan="3" class="word">
343 <?php
344 $disFuns=get_cfg_var("disable_functions");
345 if(empty($disFuns))
346 {
347 echo '<font color=red>×</font>';
348 }
349 else
350 {
351 //echo $disFuns;
352 $disFuns_array = explode(',',$disFuns);
353 foreach ($disFuns_array as $key=>$value)
354 {
355 if ($key!=0 && $key%5==0) {
356 echo '<br />';
357 }
358 echo "$value ";
359 }
360 }
361
362 ?>
363 </td>
364 </tr>
365 </table>
366 <!--组件信息-->
367 <table width="100%" cellpadding="3" cellspacing="0" align="center">
368 <tr><th colspan="4" >组件支持</th></tr>
369 <tr>
370 <td width="32%">FTP支持:</td>
371 <td width="18%"><?php echo isfun("ftp_login");?></td>
372 <td width="32%">XML解析支持:</td>
373 <td width="18%"><?php echo isfun("xml_set_object");?></td>
374 </tr>
375 <tr>
376 <td>Session支持:</td>
377 <td><?php echo isfun("session_start");?></td>
378 <td>Socket支持:</td>
379 <td><?php echo isfun("socket_accept");?></td>
380 </tr>
381 <tr>
382 <td>Calendar支持</td>
383 <td><?php echo isfun('cal_days_in_month');?>
384 </td>
385 <td>允许URL打开文件:</td>
386 <td><?php echo show("allow_url_fopen");?></td>
387 </tr>
388 <tr>
389 <td>GD库支持:</td>
390 <td>
391 <?php
392 if(function_exists(gd_info)) {
393 $gd_info = @gd_info();
394 echo $gd_info["GD Version"];
395 }else{echo '<font color="red">×</font>';}
396 ?></td>
397 <td>压缩文件支持(Zlib):</td>
398 <td><?php echo isfun("gzclose");?></td>
399 </tr>
400 <tr>
401 <td>IMAP电子邮件系统函数库:</td>
402 <td><?php echo isfun("imap_close");?></td>
403 <td>历法运算函数库:</td>
404 <td><?php echo isfun("JDToGregorian");?></td>
405 </tr>
406 <tr>
407 <td>正则表达式函数库:</td>
408 <td><?php echo isfun("preg_match");?></td>
409 <td>WDDX支持:</td>
410 <td><?php echo isfun("wddx_add_vars");?></td>
411 </tr>
412 <tr>
413 <td>Iconv编码转换:</td>
414 <td><?php echo isfun("iconv");?></td>
415 <td>mbstring:</td>
416 <td><?php echo isfun("mb_eregi");?></td>
417 </tr>
418 <tr>
419 <td>高精度数学运算:</td>
420 <td><?php echo isfun("bcadd");?></td>
421 <td>LDAP目录协议:</td>
422 <td><?php echo isfun("ldap_close");?></td>
423 </tr>
424 <tr>
425 <td>MCrypt加密处理:</td>
426 <td><?php echo isfun("mcrypt_cbc");?></td>
427 <td>哈稀计算:</td>
428 <td><?php echo isfun("mhash_count");?></td>
429 </tr>
430 </table>
431
432 <!--第三方组件信息-->
433 <table width="100%" cellpadding="3" cellspacing="0" align="center">
434 <tr><th colspan="4" >第三方组件</th></tr>
435 <tr>
436 <td width="32%">Zend版本</td>
437 <td width="18%"><?php $zend_version = zend_version();if(empty($zend_version)){echo '<font color=red>×</font>';}else{echo $zend_version;}?></td>
438 <td width="32%">
439 <?php
440 $PHP_VERSION = PHP_VERSION;
441 $PHP_VERSION = substr($PHP_VERSION,2,1);
442 if($PHP_VERSION > 2)
443 {
444 echo "ZendGuardLoader[启用]";
445 }
446 else
447 {
448 echo "Zend Optimizer";
449 }
450 ?>
451 </td>
452 <td width="18%"><?php if($PHP_VERSION > 2){echo (get_cfg_var("zend_loader.enable"))?'<font color=green>√</font>':'<font color=red>×</font>';} else{if(function_exists('zend_optimizer_version')){ echo zend_optimizer_version();}else{ echo (get_cfg_var("zend_optimizer.optimization_level")||get_cfg_var("zend_extension_manager.optimizer_ts")||get_cfg_var("zend.ze1_compatibility_mode")||get_cfg_var("zend_extension_ts"))?'<font color=green>√</font>':'<font color=red>×</font>';}}?></td>
453 </tr>
454 <tr>
455 <td>eAccelerator</td>
456 <td><?php if((phpversion('eAccelerator'))!=''){echo phpversion('eAccelerator');}else{ echo "<font color=red>×</font>";} ?></td>
457 <td>ioncube</td>
458 <td><?php if(extension_loaded('ionCube Loader')){ $ys = ioncube_loader_iversion(); $gm = ".".(int)substr($ys,3,2); echo ionCube_Loader_version().$gm;}else{echo "<font color=red>×</font>";}?></td>
459 </tr>
460 <tr>
461 <td>XCache</td>
462 <td><?php if((phpversion('XCache'))!=''){echo phpversion('XCache');}else{ echo "<font color=red>×</font>";} ?></td>
463 <td>APC</td>
464 <td><?php if((phpversion('APC'))!=''){echo phpversion('APC');}else{ echo "<font color=red>×</font>";} ?></td>
465 </tr>
466 </table>
467
468 <!--数据库支持-->
469 <table width="100%" cellpadding="3" cellspacing="0" align="center">
470 <tr><th colspan="4">数据库支持</th></tr>
471 <tr>
472 <td width="32%">MySQL 数据库:</td>
473 <td width="18%"><?php echo isfun("mysql_close");?>
474 <?php
475 if(function_exists("mysql_get_server_info")) {
476 $s = @mysql_get_server_info();
477 $s = $s ? ' mysql_server 版本:'.$s : '';
478 $c = ' mysql_client 版本:'.@mysql_get_client_info();
479 echo $s;
480 }
481 ?>
482 </td>
483 <td width="32%">ODBC 数据库:</td>
484 <td width="18%"><?php echo isfun("odbc_close");?></td>
485 </tr>
486 <tr>
487 <td>Oracle 数据库:</td>
488 <td><?php echo isfun("ora_close");?></td>
489 <td>SQL Server 数据库:</td>
490 <td><?php echo isfun("mssql_close");?></td>
491 </tr>
492 <tr>
493 <td>dBASE 数据库:</td>
494 <td><?php echo isfun("dbase_close");?></td>
495 <td>mSQL 数据库:</td>
496 <td><?php echo isfun("msql_close");?></td>
497 </tr>
498 <tr>
499 <td>SQLite 数据库:</td>
500 <td><?php if(extension_loaded('sqlite3')) {$sqliteVer = SQLite3::version();echo '<font color=green>√</font> ';echo "SQLite3 Ver ";echo $sqliteVer[versionString];}else {echo isfun("sqlite_close");if(isfun("sqlite_close") == '<font color="green">√</font>') {echo " 版本: ".@sqlite_libversion();}}?></td>
501 <td>Hyperwave 数据库:</td>
502 <td><?php echo isfun("hw_close");?></td>
503 </tr>
504 <tr>
505 <td>Postgre SQL 数据库:</td>
506 <td><?php echo isfun("pg_close"); ?></td>
507 <td>Informix 数据库:</td>
508 <td><?php echo isfun("ifx_close");?></td>
509 </tr>
510 <tr>
511 <td>DBA 数据库:</td>
512 <td><?php echo isfun("dba_close");?></td>
513 <td>DBM 数据库:</td>
514 <td><?php echo isfun("dbmclose");?></td>
515 </tr>
516 <tr>
517 <td>FilePro 数据库:</td>
518 <td><?php echo isfun("filepro_fieldcount");?></td>
519 <td>SyBase 数据库:</td>
520 <td><?php echo isfun("sybase_close");?></td>
521 </tr>
522 </table>
523
524 <form action="<?php echo $_SERVER[PHP_SELF]."#bottom";?>" method="post">
525 <!--MySQL数据库连接检测-->
526 <table width="100%" cellpadding="3" cellspacing="0" align="center">
527 <tr><th colspan="3">MySQL数据库连接检测</th></tr>
528 <tr>
529 <td width="15%"></td>
530 <td width="60%">
531 地址:<input type="text" name="host" value="localhost" size="10" />
532 端口:<input type="text" name="port" value="3306" size="10" />
533 用户名:<input type="text" name="login" size="10" />
534 密码:<input type="password" name="password" size="10" />
535 </td>
536 <td width="25%">
537 <input class="btn" type="submit" name="act" value="MySQL检测" />
538 </td>
539 </tr>
540 </table>
541 <?php
542 if ($_POST['act'] == 'MySQL检测') {
543 if(function_exists("mysql_close")==1) {
544 $link = @mysql_connect($host.":".$port,$login,$password);
545 if ($link){
546 echo "<script>alert('连接到MySql数据库正常')</script>";
547 } else {
548 echo "<script>alert('无法连接到MySql数据库!')</script>";
549 }
550 } else {
551 echo "<script>alert('服务器不支持MySQL数据库!')</script>";
552 }
553 }
554 ?>
555 <!--函数检测-->
556 <table width="100%" cellpadding="3" cellspacing="0" align="center">
557 <tr><th colspan="3">函数检测</th></tr>
558 <tr>
559 <td width="15%"></td>
560 <td width="60%">
561 请输入您要检测的函数:
562 <input type="text" name="funName" size="50" />
563 </td>
564 <td width="25%">
565 <input class="btn" type="submit" name="act" align="right" value="函数检测" />
566 </td>
567 </tr>
568 <?php
569 if ($_POST['act'] == '函数检测') {
570 echo "<script>alert('$funRe')</script>";
571 }
572 ?>
573 </table>
574
575 </form>
576
577
578 <div id="footer">
579 <p> phpStudy集成最新的Apache+Nginx+IIS+Lighttpd+PHP+MySQL+phpMyAdmin+SQL-Front+Zend Loader,一次性安装,无须配置即可使用,是非常方便、好用的PHP调试环境。该程序绿色小巧简易迷你,有专门的控制面板。总之学习PHP只需一个包。对学习PHP的新手来说,WINDOWS下环境配置是一件很困难的事;对老手来说也是一件烦琐的事。因此无论你是新手还是老手,该程序包都是一个不错的选择。
580 本程序纯绿色使用完全免费,自由复制传播。版权所有 <a href="http://www.phpstudy.net/" target="_blank">www.phpstudy.net</a></p>
581 </div>
582
583 </div>
584 </body>
585 </html>