Can't get the GD library information.
<title>First PHP program (get server information)</title>
$sysos = $_server["Server_software"];
$sysversion = php_version;
The following two code connects to MySQL database and obtains MySQL database version information
mysql_connect ("localhost", "root", "kxteb0cc");
$mysqlinfo = Mysql_get_server_info ();
Get information about the GD library from the server
if (function_exists ("Gd_info")) {
$GD = Gd_info ();
$gdinfo = $GD [' GD version '];
}else {
$gdinfo = "Unknown";
}
See if FreeType fonts are supported from the GD library
$freetype = $GD ["FreeType support"]? "Support": "Not supported";
Get the remote file from the PHP configuration file
$allowurl = Ini_get ("Allow_url_fopen")? "Support": "Not supported";
Get maximum upload limit from PHP configuration file
$max _upload = Ini_get ("File_uploads")? Ini_get ("Upload_max_filesize"): "Disabled";
To get the maximum execution time of a script from a PHP configuration file
$max _ex_time = Ini_get ("Max_execution_time"). " Seconds ";
The following two get server time, Mainland China is using the time of the East eight zone, set the time to write etc/gmt-8
Date_default_timezone_set ("etc/gmt-8");
$systemtime = Date ("Y-m-d h:i:s", Time ());
/* ********************************************************** */
/* The above gets the server information out to the client browser as an HTML table */
/* ********************************************************** */
echo "
"; Echo"
System Information
"; Echo"
Web server: |
$sysos |
"; Echo"
PHP Version: |
$sysversion |
"; Echo"
MySQL version: |
$mysqlinfo |
"; Echo"
GD Library version: |
$gdinfo |
"; Echo"
FreeType |
$freetype |
"; Echo"
Remote File Acquisition: |
$allowurl |
"; Echo"
Maximum upload limit: |
$max _upload |
"; Echo"
Maximum execution time: |
$max _ex_time |
"; Echo"
Server time: |
$systemtime |
"; Echo"
";
?>
Please help me to see which is wrong, according to the book, the other is no problem, on the GD library version is not available, the line page is displayed as empty
------Solution--------------------
$gdinfo = $GD [' gd Version '];