There was a problem loading the comments.

How can I create a phpinfo.php page?

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

Create a phpinfo.php page

  1. To create a phpinfo file, open a plain text file, add the following lines, and save: Filename: phpinfo.php

    <code>
    <?php
    
    // Show all information, defaults to INFO_ALL
    phpinfo();
    
    ?></code>
    


    NOTE:

    Your phpinfo.php file needs to be a plain text file. This means you need to make it in a text editing program capable of producing plain text files.

    • On a Windows machine, you can use Notepad, which is one of your built-in accessories.
    • On a Mac, you can use TextEdit. You must first open the TextEdit "Preferences" menu and, in the "New Document" section, select "Plain text." Then, you should start a new document in TextEdit for your phpinfo.php file.

  2. Upload the file to the server. You should upload your file to the exact directory you want to test. Typically, this will be your httpdocs (/var/www/vhosts/example.com/httpdocs/) directory, although you can upload it to any subdirectory on your server as well. Use FTP to upload the file.
  3. Visit the page in your browser. If you uploaded it to your html directory, you should now visit http://www.example.com/phpinfo.php, replacing example.com with your own domain name.
  4. Now you can view all of the information about PHP for your server for that particular directory.

Share via

Related Articles

Copyright © 2024 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)