How to open a PHP file: 13 steps (with pictures)

Table of contents:

How to open a PHP file: 13 steps (with pictures)
How to open a PHP file: 13 steps (with pictures)
Anonim

It is very easy on both Windows and macOS to open a PHP file, which is never just a text file. Once opened, you can edit the code it contains.

Steps

Method 1 of 2: In Windows

Open a PHP File Step 1

Step 1. Download and install Notepad ++

Notepad ++ is a free plain text editor and is happy to open PHP files. For installation, proceed as follows:

  • in the Internet browser of your choice, go to the page

    notepad-plus-plus.org/downloads/v7.8.2/;

  • click on the green button DOWNLOAD (DOWNLOAD);
  • double-click on the Notepad ++ executable file;
  • Follow the instructions that appear on the screen.
Open a PHP File Step 2

Step 2. Run Notepad ++

If Notepad ++ does not start by itself after installation, do To start up (

Windowsstart

), type notepad ++, then click Notepad ++ in the results list.

Open a PHP File Step 3

Step 3. Click File

The menu is in the upper left corner of the Notepad ++ window. A drop-down menu will then appear.

Open a PHP File Step 4

Step 4. Click Open

This option is in the drop-down menu. A File Explorer window will appear on the screen.

Open a PHP File Step 5

Step 5. Select your PHP file

Navigate through your folders to find your PHP file, then click once on its icon.

Open a PHP File Step 6

Step 6. Click Open

Click this button at the bottom of the window. In doing so, your PHP file opens in Notepad ++: you can then see and edit the content (i.e. PHP code) of the file.

After modifying or not, the content of your PHP file, save it using Control + S, then quit Notepad ++

Method 2 of 2: In macOS

Open a PHP File Step 7

Step 1. Download and then install BBEdit

BBEdit is a free (to some extent) code editor and can therefore easily handle PHP files. For installation, proceed as follows:

  • in the Internet browser of your choice, go to the page

    www.barebones.com/products/bbedit/;

  • right click on Free Download (Free download);
  • double click the recently downloaded DMG file;
  • authorize the opening of the compressed file;
  • drag the BBEdit icon into the folder Applications;
  • Follow the instructions that appear on the screen.
Open a PHP File Step 8

Step 2. Run Spotlight (

Macspotlight

).

In the upper right corner of the screen, click the magnifying glass icon.

Open a PHP File Step 9

Step 3. Run BBEdit

Type bbedit in Spotlight, then double click BBEdit in the game Best results.

  • If you are running BBEdit for the first time, click To open, then on To continue in order to benefit from the 30-day trial period.
Open a PHP File Step 10

Step 4. Click File

The menu is in the upper left corner of the screen. A drop-down menu will then appear.

Open a PHP File Step 11

Step 5. Click Open…

This is the second menu option File. A Finder window appears on the screen.

Open a PHP File Step 12

Step 6. Select your PHP file

Navigate through your folders to find your PHP file, then click once on its icon.

Open a PHP File Step 13

Step 7. Click Open

Click this button at the bottom of the window. In doing so, your PHP file opens in BBEdit: you can now make changes to the content or just view it.

  • Sometimes the open button is marked To choose.
  • If you change the contents of your PHP file, remember to save the file periodically by doing Command + S.

Popular by topic