> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Viewing PHP settings with the phpinfo() function

> Learn to use phpinfo() to view PHP environment details with this concise guide and helpful links.

This article describes how to use the **phpinfo()** function to view detailed information about the PHP environment, settings, and more.

<Note>
  To view **phpinfo()** output on our servers, you must have a hosting.com account. The information revealed by the **phpinfo()** function poses a potential security risk, so we do not post it publicly. Hackers and other malicious actors could use the information from **phpinfo()** to plan an attack.
</Note>

## Viewing PHP settings with phpinfo function

You often need to check PHP settings during web development. You can do this by running a script that calls the **phpinfo()** function. When you load the page in a web browser, the script shows all of the PHP configuration settings for your web site.

To use the **phpinfo()** function to view PHP settings:

1. Create a file that contains the following code:

   ```
   <?php
       phpinfo();
   ?>
   ```

2. Save the file as *info.php* or something similar.

3. Upload the file to your *public\_html* directory.

4. Use your browser to go to [http://example.com/info.php](http://example.com/info.php), where *example.com* represents your web site's domain name. The page displays a large amount of information about the PHP installation.

<Warning>
  **️ Warning**

  For security reasons, you should disable any calls to the **phpinfo()** function when web site development and testing is complete.
</Warning>

## More information

For more information about the **phpinfo()** function, please visit [http://www.php.net/manual/en/function.phpinfo.php](http://www.php.net/manual/en/function.phpinfo.php).

## Related articles

* [PHP script basics](/docs/php-script-basics)

* [Custom php.ini files](/docs/custom-php-ini-files)
