Get server information$sysos = $_SERVER["SERVER_SOFTWARE"]; //Get the string of server identification
$sysversion = PHP_VERSION; //Get the PHP server version
//The following two codes Connect to the MySQL database and obtain the MySQL database version information
mysql_connect("localhost", "mysql_user", "mysql_pass");
$mysqlinfo = mysql_get_server_info();
//Get the GD library information from the server
if(function_exists("gd_info")){ "Unknown";
}
//Check whether FreeType fonts are supported from the GD library
$freetype = $gd["FreeType Support"] ? "Support" : "Not supported";
/ /Get whether remote file acquisition is possible from the PHP configuration file
$allowurl= ini_get("allow_url_fopen") ? "Supported" : "Not supported";
//Get the maximum upload limit from the PHP configuration file
$max_upload = ini_get("file_uploads") ? ini_get("upload_max_filesize") : "Disabled";
//Get the maximum execution time of the script from the PHP configuration file
$max_ex_time= ini_get("max_execution_time") ."seconds";
//The following two methods are used to obtain the server time. Mainland China uses the time of the East Eighth District. The setting time zone is written as Etc/GMT-8
date_default_timezone_set("Etc/GMT-8");
$systemtime = date("Y-m-d H:i:s",time());
/* *********************** ****************************************** */
/ * Output the server information obtained above to the client browser in the form of an HTML table */
/* ********************** ***************************************** */
echo "
";
echo " System Information
";
echo " Web server: $sysos |
";
echo " PHP version: td> | $sysversion |
";
echo " MySQL version: | $mysqlinfo td> |
";
echo " GD library version: | $gdinfo 🎜>echo " |
FreeType: | $freetype |
";
echo " Remote file acquisition: $allowurl |
";
echo " Maximum upload limit: | < ;td> $max_upload
";
echo " Maximum execution time: | $max_ex_time |
";
echo " Server time: | $systemtime |
";
echo "
";
?>
http://www.bkjia.com/PHPjc/326463.html