phpinfo() is a commonly used native php function that provides you with php configuration information. If you need to know what php version your server is using, or what php modules your server is running, using a phpinfo page is one of the most commonly used techniques.
To create a phpinfo page:
- Open a plain text editor, such as Notepad or Notepad++
- In your new file, paste the following code:
- Save the file as something like ‘test.php’ or ‘phpinfo.php’
- Using FTP or a file management utility provided by your host, upload your new phpinfo.php file to the root of your server
- Access your new page in a web browser by using an address similar to http://www.example.com/phpinfo.php
- The page displayed should be a php info page that looks something like the screenshot below
For more information, see the php manual on phpinfo.