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?

Thanks

 
Rahul_HansAsked:
Who is Participating?
 
dazweejaCommented:
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.
0
 
EthienCommented:
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.
http://www.roadsend.com/home/index.php?pageID=compiler
0
 
b0lsc0ttIT ManagerCommented:
Rahul_Hans,

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.

b0lsc0tt
0
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?
0
 
dazweejaCommented:
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:
http://www.netbeans.org/downloads/

Or PSPad from:
http://www.pspad.com/en/download.php
0
 
b0lsc0ttIT ManagerCommented:
Rahul_Hans,
What did you decide to use?
bol
0
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.