PHP phpinfo

 PHP phpinfo is used to output the system configuration information of PHP. The info function is a built-in function of PHP. It can be used directly without installing additional plug-ins. It is used to directly output a lot of information about the local system, such as PHP Version. ), PHP Credits, PHP Core, apache2handler, Apache Environment... etc.


phpinfo function writing
bool phpinfo (int $what = INFO_ALL)
phpinfo has only one parameter, and it is not necessary to use it. Under normal circumstances, phpinfo will return a boolean value, return TRUE on success, and FALSE on failure. phpinfo can display a wealth of server PHP information, including basic PHP version, extensions opening status, server environment, HTTP headers, PHP License... etc. Through the phpinfo function, it is very quick to understand the configuration of a server In addition, phpinfo is also a debugging tool for data such as EGPCS (Environment, GET, POST, Cookie, Server).

PHP phpinfo function syntax example
<?php
 phpinfo();
?>
phpinfo() is very simple to use. You only need to write phpinfo() in a blank php file. In this way, you can directly output the detailed PHP information on the server. If the content is not displayed successfully, please use "<?php echo phpinfo ();>』This is written æ . For the sake of safety, it is not recommended to place this grammar or file on the server to avoid leakage of your system information. Usually, after querying the information, the PHP engineer will directly delete the phpinfo file from the server. Professional engineers should Develop this good habit.

For the advanced application parameters of phpinfo, please see the parameter table on PHP.net: PHP: phpinfo-Manual .

Post a Comment

0 Comments