How to Open .PHP Files
Pre-Hypertext Processor documents contain code that is run on a computer through the PHP interpreter. The interpreter then sends its output back to the user or application server that requested its services. PHP files are plain text documents that can be edited in any standard text editor. How you open a PHP file depends on whether you want to open it for editing or open it for execution.
Instructions
-
Open the File as a Notepad Document
-
1
Open the Start menu, type "notepad.exe" in the Search bar, and press "Enter."
-
2
Click "File," then "Open" and navigate to the place on your hard disk where the PHP document is stored.
-
-
3
Double-click the ".PHP" file to open it.
Execute the File as a Program
-
4
Open the Start menu, type "cmd.exe" in the Search bar, and press "Enter."
-
5
Type the letter of the drive containing your PHP file into the Command Prompt window, followed by a colon. For example, type "D:" without the quotation marks. Press "Enter."
-
6
Type "cd Path\To\Folder" without quotation marks. Replace "Path\To\Folder" with the path to the folder containing the PHP file. For example, "cd D:\Web\php", followed by pressing the "Enter" key.
-
7
Type "php <filename.php>" without quotation marks. Change <filename.php> to the name of your file. As an example, if your PHP file is named "statistics.php" type "php statistics.php" and press "Enter" on your keyboard.
-
1