How to open php file in windows 10

  1. How to open php file in windows 10

    1

    Download and install Notepad++. Notepad++ is a free, Windows-only text editor that can open PHP files. To install it, do the following:

    • Go to https://notepad-plus-plus.org/download/v7.5.8.html in your computer's web browser.
    • Click the green DOWNLOAD button.
    • Double-click the Notepad++ setup file.
    • Follow the installation prompts.

  2. How to open php file in windows 10

    2

    Open Notepad++. If Notepad++ doesn't automatically open after you finish installing it, open Start

    How to open php file in windows 10

    , type in notepad++, and click Notepad++ at the top of the results.

    Advertisement

  3. How to open php file in windows 10

    3

    Click File. It's in the top-left corner of the Notepad++ window. A drop-down menu will appear.

  4. How to open php file in windows 10

    4

    Click Open…. This option is in the drop-down menu. Doing so brings up a File Explorer window.

  5. How to open php file in windows 10

    5

    Select your PHP file. Go to the location of your PHP file, then click the PHP file to select it.

  6. How to open php file in windows 10

    6

    Click Open. It's in the bottom-right corner of the window. This will open the PHP file in Notepad++, allowing you to view the file's code and make any necessary edits.

    • If you do edit your PHP file, press Ctrl+S to save the changes before you exit Notepad++.

  7. Advertisement

  1. How to open php file in windows 10

    1

    Download and install BBEdit. This free program allows you to view and edit numerous different file types, PHP included. To install it, do the following:

    • Go to https://www.barebones.com/products/bbedit/ in your Mac's web browser.
    • Click Free Download in the upper-right side of the page.
    • Double-click the downloaded DMG file.
    • Verify the software if prompted.
    • Drag the BBEdit icon onto the "Applications" folder.
    • Follow any on-screen prompts.

  2. How to open php file in windows 10

    2

    Open Spotlight

    How to open php file in windows 10

    . Click the magnifying glass-shaped icon in the top-right corner of the screen to do so.

  3. How to open php file in windows 10

    3

    Open BBEdit. Type in bbedit, then double-click BBEdit in the resulting drop-down menu.

    • If this is your first time opening BBEdit after installing, click Open when prompted, then click Continue to continue with the 30 day trial.

  4. How to open php file in windows 10

    4

    Click File. It's in the top-left corner of the screen. A drop-down menu will appear.

  5. How to open php file in windows 10

    5

    Click Open…. This is in the File drop-down menu. Doing so opens a Finder window.

  6. How to open php file in windows 10

    6

    Select your PHP file. Go to the location in which your PHP file is stored, then click the PHP file to select it.

  7. How to open php file in windows 10

    7

    Click Open. It's in the bottom-right corner of the window. Doing so opens the PHP file in BBEdit; you should now be able to see the PHP file's text.

    • You may instead click Choose here.
    • If you edit your PHP file, be sure to save it by pressing Command+S.

  8. Advertisement

Add New Question

  • Question

    PHP file is running in xampp only when it is stored or copied in htdocs. I want to know why we aren't able to run the php files in their current locations instead of changing their directories?

    How to open php file in windows 10

    When you are running XAMPP, it is creating a web server which runs the file. The web server expects the files to be stored in the public directory, which is configurable, and defaults in the case of XAMPP to htdocs.

  • Question

    Can I print a PHP file?

    How to open php file in windows 10

    Yes, you could just click File > Print. Or you could copy it into another text editor and print it from there.

  • Question

    Which is the best to use on a .PHP in my documents?

    How to open php file in windows 10

    At the very least, you want a plain text editor, as PHP will be plain text. However, PHP is a programming language, so you are better off using a proper PHP editor which will make it look easier to read and edit. There are many available, depending on your operating system and budget, but if you just want to see what the file is, notepad will do.

See more answers

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

  • Dragging and dropping your PHP file into most web browsers (excluding Firefox) will open the PHP file's code. While the PHP file probably won't display correctly, you'll at least be able to view the file's code itself.

Thanks for submitting a tip for review!

Advertisement

  • Always save a copy of your original PHP file before making any changes. Editing the code incorrectly can cause your website to stop functioning, so it's always best to have a backup.

Advertisement

About This Article

Article SummaryX

To open a PHP file on Windows, search online for Notepad++, which is a free text-editor, and download it to your computer. Once it’s finished downloading, double-click the setup file and follow the prompts to install it. After it’s installed, open Notepad++. Then, click "File" and "Open" and locate your PHP file from the file explorer. To open a PHP file on a Mac, search online for BBEdit and download it. Double-click the downloaded DMG file and drag the BBEdit icon to your “Applications” folder. When it’s finished copying, open the program from your applications. Then, click “File” and “Open” and select your PHP file from the finder window. For more tips, including how to print a PHP file, read on!

Did this summary help you?

Thanks to all authors for creating a page that has been read 842,037 times.

Reader Success Stories

  • How to open php file in windows 10

    "Variety of options to suit user level, requirement and choice."

Is this article up to date?

How do I run a PHP file on Windows 10?

How to Install PHP.
Step 1: Download the PHP files. You'll need the PHP Windows installer. ... .
Step 2: Extract the files. ... .
Step 3: Configure php. ... .
Step 4: Add C:\php to the path environment variable. ... .
Step 5: Configure PHP as an Apache module. ... .
Step 6: Test a PHP file..

How do I open PHP on my computer?

Step 4: Open up any web browser and enter “localhost/filename”. This will open the list of all the files and folders stored under the “htdocs” folder on your computer. Click on the link to a PHP file and open it to run a program.

How do I open an PHP file?

A PHP file is a plain text file, so you can open it in any text editor like VI, Notepad, or Sublime Text.