How to create and view phpinfo file in cPanel? Print

  • 0

It is a very important and useful function of PHP to return information. It includes information about PHP compilation options and extensive version, server information and environment, PHP environment, OS version information, paths, HTTP headers and the PHP license. Please note that you can get PHP information not only from the browser but also from the command line.

Please refer to the following steps to create a phpinfo file.

  1. Login to cPanel account. Please refer to how to login to cPanel for more details.

  2. Navigate to File Manager and go to the public_html folder.

  3. From the header, choose to Create New File and give the file name phpinfo.php.

  4. Edit phpinfo.php file and insert the below lines in it.

    <?php
    phpinfo();
    ?>
  5. Now, we have created a phpinfo file. So, it is time to view that file. Let’s see how we can view that file.

  6. Kindly go to the browser and write “your IP Address/phpinfo.php” it will return the PHP information like version, environment.

This is how you can create and view the PHPInfo page in Linux.


Was this answer helpful?

« Back
Sign up for a newsletter

chat