Extension info.php
Advertisement Space
Step by Step Instructions
The info.php file is a useful tool for displaying the PHP configuration and environment information on a server. It helps developers and system administrators to diagnose issues and understand the setup of their PHP installation. This guide will walk you through the steps to create and use an info.php file effectively.
Create the info.php File
To start, you need to create a new file named info.php. You can do this using a text editor of your choice. Make sure to save the file with the .php extension.
Add PHP Code
Open the info.php file in your text editor and add the following code:
This code calls the phpinfo() function, which outputs information about the PHP environment.
Upload the File to the Server
Next, upload the info.php file to your web server. You can use an FTP client or your hosting provider's file manager to transfer the file to the root directory or any subdirectory where you want to access it.
Access the File via Web Browser
Once the file is uploaded, open a web browser and navigate to the URL where you uploaded the info.php file. For example, if you uploaded it to the root directory, you would enter `http://yourdomain.com/info.php`.
Review PHP Configuration Information
After accessing the info.php file, you will see a detailed page displaying various information about your PHP installation, including version, configuration settings, loaded extensions, and environmental variables. Review this information to gain insights into your PHP setup.