Editing a PHP file

marine1

Honorary Master
Joined
Sep 4, 2006
Messages
50,636
Reaction score
3,183
Location
A black hole in the universe - JHB
Hi guys how would you edit a PHP file or should I say what program would you use, with the feature of seeing what you are editing while editing the file.
I have tried Dreamweaver but not able to do it, I understand you have to do it online, through FTP but it keeps saying page not found for some reason.

Thanks
 
You need to grab the file from your webhost, edit it on your machine with drewamweaver and when done, upload it with FTP (which you configure in dreamweaver)
 
1) Download the PHP file to your local PC
2) Make copy of the file - So you can keep the original as backup.
3) Edit - notepad++ but Dreamweaver actually works well because it has code highlighting.
4) Upload back to FTP server.

It would require you to have some sort of PHP programming knowledge though..
 
Dude, install apache and php on your computer (if you're using windows, look for something called wamp). Get it going on your computer, browse to http://localhost/path/to/file.php

So open that file in notepad or whatever you use for editing, and every time you save it, just reload the page, and you'll see the changes.

BTW, dreamweaver is massive overkill for editing php files, which are essentially plain text.
 
Well php is coding, so there is nothing to see unless it is processed by a php server. I know Zend Studio allows you to do this. Keep in mind that there could also be HTML in the php files that are is echo'ed out.
 
I wouldn't say so at all. If you're changing layout and the look of the page then no problem. The file you're editing is more often than not mostly html with some php code in it that sits in between <?php Code Here ?>
 
Ok tell me this then, what online store interface does not use PHP and uses rather HTML?
Thanks

HTML is just for presentation. You need some kind of scripting language like PHP to run the logic of making items available for sale.
 
Ok tell me this then, what online store interface does not use PHP and uses rather HTML?
Thanks

If you want a shopping cart that you can add items to and remove items with an easy to use admin interface, none.

They all need some form of database to store info, a user interface to make changes easy etc.

If you're simply looking to change the looks how ever, most have a templating system of some kind where you hardly have to touch any php. What shopping cart software are you using? If we know this we can point you in the right direction as most of the software are well documented, even if they aren't there's bound to be someone on here who has worked with it before.
 
Oscommerce, you can add and edit but cannot edit the homepage from what I can see.

Of course you can. It's just that it's both more difficult and more easy than you want it to be.

1. Let go of wanting to edit it wysiwyg. That's not how it works.
2. There has been some advice in this thread about setting up wamp - that is the way to go.
3. It will take some setting up, and some learning, but it is really not that hard.

You're going to have to learn how to work in code - if that is not something you're prepared to do, then you're not the right person to be attempting this project.
 
The guys here have given some good pointers. Install XAMPP on your machine so that you can learn how to do everything on a local host first. This way you can mess things up and no harm is really done. Practice and lots of research makes (nearly) perfect :).
If you're using Joomla, you can learn the basics of html and php using the article editors which has a browser viewer built into it - so edit the source code, then generate the page to see what it looks like. It has a wysiwyg editor.
But otherwise, in my opinion, you need to know some basics of coding and being able to edit php files regardless of the online store solution you choose...
 
Top
Sign up to the MyBroadband newsletter
X