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

黄舟
Release: 2023-03-06 19:44:01
Original
2433 people have browsed it

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; ?>
Copy after login

MYSQLSupport:

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

MySQL databaseContinuous connections:

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

Maximum number of MySQL connections:

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

Server operating system:

<?PHP echo PHP_OS; ?>
Copy after login

Server-side information:

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

MaximumUploadLimitations:

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

ZEND version:

<?PHP echo zend_version(); ?>
Copy after login

Maximum execution time:

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

Maximum memory occupied by script running:

<?PHPecho get_cfg_var ("memory_limit")?get_cfg_var("memory_limit"):"无"?>
Copy after login

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

mysql_get_server_info();
Copy after login

Get the MYSQL database of the service

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

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");
Copy after login
Copy after login


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!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!