PHP Introduction | Functions | phpinfo - Checking PHP Information and Settings

PHP settings are usually configured in php.ini. However, the location of the php.ini file differs depending on the OS or installation method. It is also a text file, so it is not always easy to read.

The useful function in this case is phpinfo(). It displays PHP information and settings in a table.

Syntax

phpinfo()

There are no arguments.

Example

Create a PHP file with an appropriate name and write the following code.

<?php phpinfo(); ?>