This wikiHow teaches you how to open and edit PHP programming files on a Windows or Mac computer.
Step
Method 1 of 2: On Windows Computer
Step 1. Download and install Notepad++
Notepad++ is a free text editing program that is only available for Windows operating systems and can open PHP files. To install it, follow these steps:
- Visit https://notepad-plus-plus.org/download/v7.5.8.html via a computer web browser.
- Click the button " DOWNLOAD ” which is green.
- Double-click the Notepad++ installation file.
- Follow the installation instructions that appear.
Step 2. Open Notepad++
If the Notepad++ program does not open automatically after installation, go to the menu “ Start ”
type notepad++, and click “ Notepad++ ” at the top of the search results.
Step 3. Click File
It's in the upper-left corner of the Notepad++ window. A drop-down menu will appear after that.
Step 4. Click Open…
This option is in the drop-down menu. After that, the File Explorer window will be displayed.
Step 5. Select the PHP file
Go to the location where the PHP file is stored, then click on the file to select it.
Step 6. Click Open
It's in the lower-right corner of the window. The PHP file will open in a Notepad++ window so you can view the file's code and make any necessary edits.
If you need to edit a PHP file, press Ctrl+S to save changes before exiting the Notepad++ program
Method 2 of 2: On Mac Computer
Step 1. Download and install BBEdit
This free program allows you to view and edit various types of files, including PHP. To install it, follow these steps:
- Visit https://www.barebones.com/products/bbedit/ through your computer's web browser.
- Click " Free Download ” in the top right corner of the page.
- Double-click the downloaded DMG file.
- Perform software verification if prompted.
- Drag the BBEdit icon to the " Applications " folder.
- Follow the instructions shown on the screen.
Step 2. Open Spotlight
Click the magnifying glass icon in the upper-right corner of the screen to open it.
Step 3. Open BBEdit
Type in bbedit, then double click BBEdit ” in the displayed drop-down menu.
If this is your first time opening BBEdit after installing it, click “ Open ” when prompted, then select “ Continue ” to continue the trial period for 30 days.
Step 4. Click File
It's in the top-left corner of the screen. After that, a drop-down menu will be displayed.
Step 5. Click Open…
This option is in the drop-down menu “ File Once clicked, a Finder window will appear.
Step 6. Select the PHP file
Go to the location where the PHP file is stored, then click the PHP file to select it.
Step 7. Click Open
It's in the lower-right corner of the window. After that, the PHP file will be opened in BBEdit. You can now see the text stored in the PHP file.
- You may need to click the “ Choose ”.
- If you want to edit the file, make sure you save your changes by clicking the keyboard shortcut Command+S.