How To

How to Make a PHP File

Contributor
By Launie Sorrels
eHow Contributing Writer
(0 Ratings)
Make a PHP File
Make a PHP File

The PHP Group aids in managing PHP guidelines because there are no formal specifications that outline PHP. PHP was created in 1995 by Rasmus Lerdorf, and originally stood for Personal Home Page. PHP is a scripting language that is suited for web development, and it can be embedded in HTML. For PHP to work properly it is usually installed on a server. The user uploads the PHP files to the server and can run them from their site.

Difficulty: Moderately Easy
Instructions
  1. Step 1

    Open a simple text editor. It is best to use something like Notepad or Wordpad. Microsoft Word and other higher level word processors add a lot of extra formatting that can get in the way of writing or saving code-oriented files.

  2. Step 2

    Enter your PHP code. Remember, for the code to be read properly you must have "<?php" (no quotes) at the top of the document, and "?>" (no quotes) at the end. For example:

    <?PHP
    $GetFile = @fopen("/tmp/filetoread.txt","r");
    ?>

  3. Step 3

    Save the file. Use the "Save As..." feature to save the file to your desktop as a .txt file.

  4. Step 4

    Navigate to the file you just created.

  5. Step 5

    Right-click the file and rename it. Change the extension from ".txt" to ".php". You have created a PHP file.

Tips & Warnings
  • PHP is a scripting language. You should have some programming experience to understand and properly execute code using PHP.

Post a Comment

Post a Comment

eHow Article: How to Make a PHP File

  • Have you done this? Click here to let us know.
I Did This

Related Ads

Computers
Alexia Petrakos,

Meet Alexia Petrakos eHow's Computers Expert.

Get Free Computers Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

eHow Computers
eHow_eHow Technology and Electronics