Support / KnowledgeBase

 
Search the KnowledgeBase Search

How can I create a phpinfo.php page?

  • Applies to: All Service Types

  • Difficulty: Easy

  • Time needed: 5 minutes

  • Tools needed: None

 

DETAILS:

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 lines 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.

http://www.mt-example.com/folder/phpinfo.php

LINKS

http://us.php.net/

Revisions:

07-20-2009: Minor Fixes
 


User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue