Archive:
123<meta http-equiv= "Content-type" content= "Text/html;charset=utf-8" >4<title> Get Server information </title>56 7<body>8<?PHP9 $sysos=$_server["Server_software"];//gets the string for the server identityTen $sysversion=php_version;//get PHP Server version One A mysql_connect("localhost", "root", "123456"); - $mysqlinfo=Mysql_get_server_info(); - the if(function_exists("Gd_info")){ - $GD=gd_info (); - $gdinfo=$GD[' GD Version ']; - } + Else{ - $gdinfo= "Unknown"; + } A at $freetype=$GD["FreeType support"]? " Support ":" Not Supported "; - - $allowurl=Ini_get("Allow_url_fopen")? " Support ":" Not Supported "; - - $max _upload=Ini_get("File_uploads")?Ini_get("Upload_max_filesize"): "Disabled"; - in $max _ex_time=Ini_get("Max_execution_time"). " Seconds; - toDate_default_timezone_set ("Etc/gmt-8"); + $systemtime=Date("Y-m-d h:i:s", Time()); - the Echo"<table align=center cellspacing=0 cellpadding=0>"; * Echo"<caption>; $ Echo"<tr><td>web Server:</td><td>$sysos</td></tr> ";Panax Notoginseng Echo"<tr><td>php version:</td><td>$sysversion</td></tr> "; - Echo"<tr><td>mysql version:</td><td>$mysqlinfo</td></tr> "; the Echo"<TR><TD>GD Library version:</td><td>$gdinfo</td></tr> "; + Echo"<tr><td>FreeType:</td><td>$freetype</td></tr> "; A Echo"<tr><td> Remote file Acquisition:</td><td>$allowurl</td></tr> "; the Echo"<tr><td> Max upload limit:</td><td>$max _upload</td></tr> "; + Echo"<tr><td> Maximum execution time:</td><td>$max _ex_time</td></tr> "; - Echo"<tr><td> Server Time:</td><td>$systemtime</td></tr> "; $ Echo"</table>" $?> -</body> -The results are as follows:
A very easy script--php get information about the server side