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