Editing PHP Files

I had worked on PHP files along with mysql and Apache quite a long time ago.

I am working on some PHP files that I am able to view through localhost on my laptop.

However, it has been a long time and I need to know how to edit / view the source code of the PHP file.

Can someone provide me with a quick refresher on how to view a PHP file under Xampp

Is there an inbuilt editor in Xampp (xampplite-win32-1.7.0)?

How can i change the source or at least view the source in an intelligible manner

Is View source and saving the source in the text file the way to do it?


Who is Participating?
The latest version of Netbeans is a great free PHP editor, as is Eclipse PDT.

However, you can't view the source by saving the page from a web browser or selecting View Source. What you see through a web browser is the output of the PHP file once it has been processed by the PHP module of Apache, ie. not the PHP source files themselves.

To edit the source files directly, look in \xampp\htdocs.
Well since your on a local host you don't have a built in code editor. So you could use Notepad to edit but if your looking for a simple compiler or IDE try using Roadsend.
b0lsc0ttIT ManagerCommented:

You just need a text editor to see PHP source or edit its contents.  Notepad was mentioned but PSPad, EditPad and a number of others are free and will support PHP files, with more features.  PHP files are not compiled and can be opened like any other text editor.

Let me know if you have any questions or need more information.

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Rahul_HansAuthor Commented:
Okay. Thanks for the update.
I had tried to use notepad to edit the .php file in htdocs. However i could not see the php file with proper formatting.
It was as if the line feeds and carriage returns were ignored and i could not see individual lines properly.
Can you provide some help?
If you use Wordpad instead of Notepad, it should display correctly.

However, the code will be much easier to read and edit (color coded, line numbers, code hinting, etc) with a proper PHP IDE.

Download the PHP version of Netbeans for free from:

Or PSPad from:
b0lsc0ttIT ManagerCommented:
What did you decide to use?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.