How to Save a File As a PHP

How to Save a File As a PHP thumbnail
Save your PHP file.

PHP (PHP: hypertext preprocessor) is a scripting language that runs on a server. PHP files can be created using HTML, PHP or text editors. HTML and PHP editors are useful because they contain features, such as highlighting, to assist you in coding syntax correctly.

Things You'll Need

  • HTML, PHP or text editor
  • Web server with PHP support (optional)
Show More

Instructions

    • 1

      Launch your editor, and enter your PHP coding between "<?php" and "?>" tags. Use the following example:

      <?php echo '<p>Welcome to my site</p>'; ?>

      Save the file with a ".php" extension, for example, "index.php."

    • 2

      Optionally, upload the file to your server, and navigate to your page in a browser. This is useful for testing your file.

    • 3

      View your web page source. The PHP code has generated the following:

      <p>Welcome to my site</p>

Tips & Warnings

  • Check the file on your system, and make sure the file name has no other additions such as "index.php.txt." If it does, remove the extraneous extension.

Related Searches:

References

  • Photo Credit diskette image by Soja Andrzej from Fotolia.com

Comments

You May Also Like

Related Ads

Featured