⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 diagnose.php

📁 jsp程序开发系统
💻 PHP
字号:
<?php
// +-------------------------------------------------------------+
// | DeskPRO v [2.0.1 Production]
// | Copyright (C) 2001 - 2004 Headstart Solutions Limited
// | Supplied by WTN-WDYL
// | Nullified by WTN-WDYL
// | Distribution via WebForum, ForumRU and associated file dumps
// +-------------------------------------------------------------+
// | DESKPRO IS NOT FREE SOFTWARE
// +-------------------------------------------------------------+
// | License ID : Full Enterprise License =) ...
// | License Owner : WTN-WDYL Team
// +-------------------------------------------------------------+
// | $RCSfile: diagnose.php,v $
// | $Date: 2004/02/10 01:34:25 $
// | $Revision: 1.14 $
// +-------------------------------------------------------------+
// | File Details:
// | - Display assorted server diagnostic and status information
// |   (administration interface)
// +-------------------------------------------------------------+

error_reporting(E_ALL & ~E_NOTICE);
require_once('./global.php');
//Nullify WTN-WDYL Team

// default do
$_REQUEST['do'] = trim($_REQUEST['do']);
if (!isset($_REQUEST['do']) or $_REQUEST['do'] == "") {
	$_REQUEST['do'] = "mysql_vars";
}

############################### PHP INFO ###############################

if ($_REQUEST['do'] == 'phpinfo') {
	admin_header('Server Information', 'PHP Info');
	print $nav;
	ob_start();
	phpinfo();
	$phpinfo .= ob_get_contents();
	ob_end_clean();
	$tmp = stristr($phpinfo, '<table');
	$phpinfo = substr($phpinfo, (strlen($phpinfo) - strlen($tmp)), -19);
	print str_replace( 'width="600"', 'width="450"', $phpinfo);
}


############################### INI VARS ###############################

if ($_REQUEST['do'] == 'inivars') {
	admin_header('PHP Environment Variables', 'PHP Info');
	print $nav;



	foreach (ini_get_all() AS $key => $var) {

			$table[] = array(
				$key,
				$var['global_value'],
				$var['local_value'],
				$var['access']
			);
	}

	$columns = array('Variable Name', 'Global Value', 'Local Value', 'Change Permissions');
	table_header('mySQL Variables');
	table_content($columns, $table, '', '', '', '', array('30%', '70%'));
	table_footer();
	unset($table);

?>
<pre>
PHP_INI_USER | 1 | Entry can be set in user scripts
PHP_INI_PERDIR | 2 | Entry can be set in php.ini, .htaccess or httpd.conf
PHP_INI_SYSTEM | 4 | Entry can be set in php.ini or httpd.conf
PHP_INI_ALL | 7 | Entry can be set anywhere
</pre>
<?php

}

############################### MYSQL VARS ###############################

if ($_REQUEST['do'] == "mysql_vars") {
	admin_header('Server Information', 'mySQL Variables');
	print $nav;

	$result = $db->query('SHOW VARIABLES');
	$colcount = $db->num_fields($result);

	for ($i = 0; $i < $colcount; $i++) {
		$columns[] = $db->field_name($i);
	}

	while ($result = $db->row_array()) {
		for ($i = 0; $i < $colcount; $i++) {
			$tmp[] = $result[$i];
		}
		$table[] = $tmp;
		unset($tmp);	
	}

	table_header('mySQL Variables');
	table_content($columns, $table, '', '', '', '', array('30%', '70%'));
	table_footer();
	unset($table);
}

############################### MYSQL STATUS ###############################

if ($_REQUEST['do'] == "mysql_status") {
	admin_header('Server Information', 'mySQL Status');
	print $nav;

	$result = $db->query('SHOW STATUS');
	$colcount = $db->num_fields($result);

	for ($i = 0; $i < $colcount; $i++) {
		$columns[] = $db->field_name($i);
	}

	while ($result = $db->row_array()) {
		for ($i = 0; $i < $colcount; $i++) {
			$tmp[] = $result[$i];
		}
		$table[] = $tmp;
		unset($tmp);	
	}

	table_header('mySQL Status');
	table_content($columns, $table, '', '', '', '', array('50%', '50%'));
	table_footer();
	unset($table);
}

############################### MYSQL STATUS ###############################

if ($_REQUEST['do'] == "table_status") {
	admin_header('Server Information', 'mySQL Table Status');
	print $nav;

	$result = $db->query('SHOW TABLE STATUS');
	$colcount = $db->num_fields($result);

	for ($i = 0; $i < $colcount; $i++) {
		$columns[] = $db->field_name($i);
	}

	while ($result = $db->row_array()) {
		for ($i = 0; $i < $colcount; $i++) {
			$tmp[] = $result[$i];
		}
		$table[] = $tmp;
		unset($tmp);	
	}

	table_header('mySQL Table Status');
	table_content($columns, $table, '', '', '', '', array('50%', '50%'));
	table_footer();
	unset($table);
}

##############################################################

admin_footer();

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -