Home  >  Article  >  Backend Development  >  PHP Detailed explanation of the most complete basic command to obtain server operating system information

PHP Detailed explanation of the most complete basic command to obtain server operating system information

黄舟
黄舟Original
2017-03-21 09:51:552372browse

The most recent project background development involves displaying some basic information about the operating system where the current server is located. This includes: PHP version, server operating system, etc. There are many, now I have summarized some and share them with you for your reference. The details are as follows:

PHP version:

<?PHP echo PHP_VERSION; ?>

MYSQLSupport:

<?php echo function_exists (mysql_close)?"是":"否"; ?>

MySQL databaseContinuous connections:

<?phpecho @get_cfg_var("mysql.allow_persistent")?"是 ":"否";?>

Maximum number of MySQL connections:

<?phpecho @get_cfg_var("mysql.max_links")==-1 ? "不限" : @get_cfg_var("mysql.max_links");?>

Server operating system:

<?PHP echo PHP_OS; ?>

Server-side information:

<?PHP echo $_SERVER [&#39;SERVER_SOFTWARE&#39;]; ?>

MaximumUploadLimitations:

<?PHPecho get_cfg_var ("upload_max_filesize")?get_cfg_var ("upload_max_filesize"):"不允许上传附件";?>

ZEND version:

<?PHP echo zend_version(); ?>

Maximum execution time:

<?PHP echo get_cfg_var("max_execution_time")."秒 "; ?>

Maximum memory occupied by script running:

<?PHPecho get_cfg_var ("memory_limit")?get_cfg_var("memory_limit"):"无"?>

QueryThe version of the currently connected MYSQL database php comes with Function

mysql_get_server_info();

Get the MYSQL database of the service

date_default_timezone_set (PRC);echo date("Y-m-d G:i:s");

Version php comes with the function mysql_get_server_info()

Get the server system time

date_default_timezone_set (PRC);echo date("Y-m-d G:i:s");


The above is the detailed content of PHP Detailed explanation of the most complete basic command to obtain server operating system information. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn