How can I create a phpinfo.php page?

The phpinfo file 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.

Because every system is setup differently, phpinfo() is commonly used to check configuration settings and for available predefined variables on a given system.

phpinfo() is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.

To create the file simply add the following line of code to a blank document and name the file phpinfo.php 

<?php phpinfo(); ?>

Save the file as phpinfo.php and place it in the desired directory. Lastly, call the script from a browser. 

e.g.  http://www.yourdomain.com/foldername/phpinfo.php 

  • 25 Users Found This Useful
Was this answer helpful?

Related Articles

How do I access my Hosting / Email Control Panel?

To access your Hosting / Email Control Panel do the following:FOR CPANEL ACCOUNTS Open a Web...

how to password protect directories

Password Protect Directories allows you to protect a folder by requiring users to enter a...

How your site works

Your website is made up of a group of files and directories, much like your Documents folder on...

Uploading Files to your site

For your visitors to be able to visit your site, you will need to add some files to it. You can...

How to upload content using Microsoft Publisher?

Open Microsoft Publisher and go to File -> Publish to the web. First you would have to set...