Home Backend Development PHP Tutorial 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

Mar 21, 2017 am 09:51 AM

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 ['SERVER_SOFTWARE']; ?>
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!

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

CakePHP Date and Time

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

CakePHP Project Configuration

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

CakePHP File upload

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

CakePHP Routing

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

Discuss CakePHP

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

How To Set Up Visual Studio Code (VS Code) for PHP Development

CakePHP Quick Guide CakePHP Quick Guide Sep 10, 2024 pm 05:27 PM

CakePHP Quick Guide

See all articles