Php_uname () The meaning of this function is to return information about the system currently running in PHP, and the following is a detailed description of this function:
/* * function: Returns information on the system currently running in PHP * @param string $mode * ' a ': returns all information * ' s ': name of the operating system, such as FreeBSD * ' n ': the name of the host, such as cnscn.org * ' R ': version name, such as 5.1.2-release * ' V ': operating System version number * */ string Php_uname ([string$mode
Examples of Use:
Echo Php_uname echophp_uname
Php_os PHP comes with a built-in constant, which returns the server -side operating system identifier, value (WINNT,WIN32, etc.)
Examples of Use:
Echo Strtoupper (substr(php_os
Directory_separator PHP comes with a built-in constant that displays the system delimiter command, without any definition and inclusion to use directly. As we all know, the path delimiter under Windows is \ (and of course, it works on some systems), and the path delimiter on Linux is/,directory_separator the meaning of this constant exists is that different separators are displayed depending on the operating system.
An example of using Directory_separator to determine the operating system type is as follows:
Echo
Path_separator is a constant, in the Linux system is a ":" Number, Windows is a ";" No.
An example of using Path_separator to determine the operating system type is as follows:
Echo
How PHP determines whether the current operating system is Linux or Windows