How to Save PHP Files in Mac TextEdit

How to Save PHP Files in Mac TextEdit

We are searching data for your request:

Forums and discussions:
Manuals and reference books:
Data from registers:
Wait the end of the search in all databases.
Upon completion, a link will appear to access the found materials.

TextEdit is a simple text editor that comes standard on every Apple Macintosh computer. By following a few simple steps, you can use the TextEdit program to create and save PHP files. PHP is a server-side programming language that is used in conjunction with HTML to enhance the features of a website.

Open TextEdit

​If the icon for TextEdit is located on the dock, as it is when the computer ships, just click the icon to launch TextEdit. Otherwise,

  • Open a Finder window by clicking on the Finder icon in the dock.
  • Choose Applications from the menu on the left.
  • In the list of applications on the right side of the screen, find and double-click TextEdit.

Change the TextEdit Preferences

  • From the Format menu at the top of the screen, choose Make Plain Text. If you don't see this option, but see "Make Rich Text," the document is already set for plain text.
  • Select Preferences from the TextEdit menu at the top of the screen.
  • Click the New Document tab and confirm the radio button next to "Plain text" is selected.
  • Click the Open and Save tab and confirm the box next to "Display HTML files as HTML code instead of formatted text" is checked.

Enter the Code

Type the PHP code into TextEdit.

Save the File

  • Choose Save from the File menu.
  • Enter your_file_name.php into the Save As field, being sure to include the .php extension.
  • Click the Save button.

If a pop-up asks you if you want to use .txt or .php as the file extension. Click the Use .php button.


You cannot test your PHP code in TextEdit. You can test it in PHP if you have it on your Mac, or you can download an emulator app from the Mac App Store-PHP Code Tester, PHP Runner and qPHP can all be used to test the accuracy of your code. Just copy it from the TextEdit File and paste it into the application screen.


  1. Wingate

    Exact phrase

  2. Elam

    In my opinion you are not right. Write to me in PM, we'll talk.

  3. Joris

    What charming question

Write a message