What is a PHPinfo file? From the php.net description.
Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and extensions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths, master and local values of configuration options, HTTP headers, and the PHP License.
In short, a PHPinfo file is meant to display information about your PHP installation for troubleshooting code and server installations. Looking at this file will give you a good understanding of how and what services are configured on the mahcine. A sample output file can be viewed by clicking
here.
To create the file, use a text editor and enter the following or
download it by clicking here.
<?php
// Show all information
phpinfo();
?>
Save this file with a .php extension (you can choose any name) and save it in a public location of your web hosting account (the web root or public_html directory for example.) You can now view the output of this file by directly browsing to the location. In the following example we are assuming the file has been saved with the name of phpinfo.php.
www.example.com/phpinfo.php
After you are done using this file, delete it from your server.
NOTE: This file may act differently on your host as this feature can be disabled.
IMPORTANT: This could give valuable information to people intending on harming a system. Do not leave this file on our system or your system when not in use.
