Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Getting Started with PHP Install PHP on Mac OS X

Ignacio Alderete
Ignacio Alderete
674 Points

install php on mac osx

When Im going to save my file into my htdocs folder appears a windows where says that I cannot save the document with extension php at the end of the name. The required extension is ".rtf". or use both

What program are you using to write your code?

6 Answers

Mike Costa
PLUS
Mike Costa
Courses Plus Student 26,362 Points

Bailey Yordnoff Textedit can save php files. In the preferences, there's 2 sections, "New Document", where you should check off "plain text" which will remove all of textedit's formatting. On the second section, "Open and Save", there's a checkbox for "add .txt extension to plain text files". If you uncheck that, save the file, and give it the .php extension, it should save with no problems.

James Barnett
James Barnett
39,199 Points

> Should I use a different text Editor?

You can use Textedit, however that's making it hard on yourself, instead use a programming text editor. A good free option for OS X is Text Wrangler.

Ignacio Alderete
Ignacio Alderete
674 Points

Should I use a different text Editor?

TextEdit cannot save in any other format than RTF. Download and use Sublime Text for free at the link there. It's what Treehouse instructors use, and can save in almost any format.

Ignacio Alderete
Ignacio Alderete
674 Points

OK. I will do Thanks Balley