-
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.
-
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");
?> -
Step 3
Save the file. Use the "Save As..." feature to save the file to your desktop as a .txt file.
-
Step 4
Navigate to the file you just created.
-
Step 5
Right-click the file and rename it. Change the extension from ".txt" to ".php". You have created a PHP file.











