How to Test the PHP on HostGator

PHP: Hypertext Prepocessor, or PHP, is a Web programming language that can be used to add dynamic elements to your website. With PHP, you can create or use pre-made scripts, including blogging scripts. PHP 4 and 5 are both widely used releases of the language and newer scripts may require the newest specification (PHP 5). You can use a simple line of PHP code to display the PHP specifications of a website host, such as HostGator, to see if your script is compatible with PHP or if PHP is supported at all.

Instructions

    • 1

      Open a code editor such as Notepad. Create a new document if one does not automatically open.

    • 2

      Paste the following code into your new document:

      <html>

      <head>

      <title> PHP Test Script </title>

      </head>

      <body>

      <?php

      phpinfo( );

      ?>

      </body>

      </html>

    • 3

      Save the document with the "php" extension. For example, you might save it as "test.php".

    • 4

      Upload the document to HostGator. You can do this by logging into your file manager via Web browser and clicking the "Upload" button or connecting to the server with an FTP client, navigating to your "public_html" directory and dragging and dropping the test file into the directory.

    • 5

      Open your browser and type the URL to the test file in your address bar to visit it. If you saved the file as "test.php" then you will visit "http://yourwebsite.com/test.php" where "yourwebsite.com" represents the actual address of your site.

Related Searches:

References

Resources

Comments

You May Also Like

  • How to Test With PHP

    You will learn how to ask about PHP. You will also learn how to run a simple test for PHP. PHP support...

Related Ads

Featured