?
Solved

Editing PHP Files

Posted on 2009-04-18
6
Medium Priority
?
349 Views
Last Modified: 2013-12-13
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

 
0
Comment
Question by:Rahul_Hans
6 Comments
 
LVL 2

Expert Comment

by:Ethien
ID: 24176397
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
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 24177358
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
 
LVL 3

Accepted Solution

by:
dazweeja earned 2000 total points
ID: 24178273
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Rahul_Hans
ID: 24182022
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
 
LVL 3

Assisted Solution

by:dazweeja
dazweeja earned 2000 total points
ID: 24182099
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
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 24187053
Rahul_Hans,
What did you decide to use?
bol
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question