This article is an example of how PHP obtains information about the server's operating system. Share to everyone for your reference, specific as follows:
The following is the basic statement that PHP obtains the current server information.
PHP Program version:
? PHP echo php_version;?>
Zend Version:
? PHP echo zend_version ();?>
MySQL Support:
<?php Echo function_exists (mysql_close)? " Yes ": no";?>
MySQL Database continuous connection:
<?php
Echo @get_cfg_var ("Mysql.allow_persistent")? Yes ": no";
? >
Maximum number of MySQL connections:
<?php
Echo @get_cfg_var ("Mysql.max_links") ==-1? "Unlimited": @get_cfg_var ("Mysql.max_links");
? >
Server operating system:
Server-side information:
? PHP echo $_server [' server_software '];?>
Maximum upload limit:
? PHP
Echo Get_cfg_var ("Upload_max_filesize")? Get_cfg_var ("Upload_max_filesize"): "Not allowed to upload attachments";
? >
Maximum execution time:
? PHP Echo Get_cfg_var ("Max_execution_time"). " Seconds ";?>
Script run consumes maximum memory:
? PHP
Echo Get_cfg_var ("Memory_limit")? Get_cfg_var ("Memory_limit"): "None"
?>
Query the version of the currently connected MySQL database PHP self-with function
Access to services
Date_default_timezone_set (PRC);
echo Date ("y-m-d g:i:s");
MySQL database version of PHP with function mysql_get_server_info ()
Get Server System time
Date_default_timezone_set (PRC);
echo Date ("y-m-d g:i:s");
More interested in PHP related content readers can view the site topics: "PHP Network Programming Skills Summary", "Php Curl Usage Summary", "PHP Socket Usage Summary", "PHP Regular Expression Usage summary", "PHP string (String) Usage Summary", " PHP array Operation techniques Encyclopedia, "PHP Mathematical Calculation Skills Summary", "PHP object-oriented Programming Introductory Course", "PHP Data structure and algorithm tutorial", "PHP Programming algorithm Summary" and "PHP common database Operation Skills Summary"
I hope this article will help you with the PHP program design.