When it has extension .php on my computer and I open it it goes to an apache prompt where I cannot type anything else in. When I change it to .txt it allows me to modify the code. Is this the only way I can modify .php coding?
Is .txt the only way to edit php files?
I assume your using windows? You need to change the file extension to be opened in notepad or whatever editor you use.
Open windows explorer goto tools -> folder options -> file types, find the .php extension and associate it with your editor.
Thanks alot thorpe. Are there any good editors besides just the regular notepad?
You can use HTML Kit or if you want to actually debug PHP then get PHP Designer 2005 or 2006, but you will need to also put PHP on your local machine so PHP Designer can find the php.exe file and it will allow display in a tmp file, but if you were going to do that you might as well go ahead and set up a web server on your local machine with Apache PHP and possible MySQL.
Well the deal is i've installed Apache, MySQL and PHP on my home computer. Its a windows XP system and I believe everything works fine. As I've test'd it with a PHP code of <? phpinfo() ?> in a test.php file and it has shown up in the http://localhost/test.php with the correct information. I'm relying on that as an indication of a good install. Anywho I think I'm just going to use the basic notepad to edit so that I can learn PHP the right way and build code from ground up. Eventually I want to just create a small CMS that I can use on a personal site. I'm using this as a way to learn php and accomplish something at the same time.
Notepad? Sure but you are really missing out on all the pretty colors that syntax highlighting can provide. Download TextPad. Or if you are really cheap (and up for a challenge) there is a gvim binary for Windoze. Plus, when you start to get lots of files in your project its nice to view them all at once in side pane on TextPad. Plus you can one-click open a browser. OK. I'll stop. BTW, I use jedit.
TourneySpec:
TourneySpec:
Anywho I think I'm just going to use the basic notepad to edit so that I can learn PHP the right way and build code from ground up. Eventually I want to just create a small CMS that I can use on a personal site. I'm using this as a way to learn php and accomplish something at the same time.
Good move. That is all I use, and I know several very successful PHP/MySql programmers who wouldn't use anything else.
Great way to learn to code the correct way.
Good Luck
There's nothing wrong with using a basic text editor to program, or with thinking that anyone who does otherwise hasn't learned "the correct way". I just want to point out that, just as there are many who would scoff at the idea of using Windows (like I do) for anything, there are many, many professional programmers and programming teachers who use and recommend the use of syntax-highlighting editors and IDEs, on any OS, for both new and experienced coders.
Try using AceHTML, you can get a free version and it provides syntax highlighting and tabs so that you can have more than one php file open at once! It also allows you to do things like inserting tables, images etc but doesnt bloat your code with anything un-necessary.