kazali Posted October 18, 2007 Share Posted October 18, 2007 Hi I am brand new to PHP but need it for forms I'm planning on using in a new website. So I've been reading some tutorials and testing some php script. However, unlike when you add the .html extension when using notepad to write html code, all I get is a notepad icon instead of the IE icon and when I open it with IE or Firefox all I get is a page of html coding. Which software should I be using to write the code? Karen Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/ Share on other sites More sharing options...
trq Posted October 18, 2007 Share Posted October 18, 2007 You can write php in any text editor. You might need to configure notepad to be the default application to open .php files with however. Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-372427 Share on other sites More sharing options...
~n[EO]n~ Posted October 18, 2007 Share Posted October 18, 2007 You need Apache server installed to run php file in browser. Have you installed that ??? Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-372433 Share on other sites More sharing options...
wildteen88 Posted October 18, 2007 Share Posted October 18, 2007 Hi I am brand new to PHP but need it for forms I'm planning on using in a new website. So I've been reading some tutorials and testing some php script. However, unlike when you add the .html extension when using notepad to write html code, all I get is a notepad icon instead of the IE icon and when I open it with IE or Firefox all I get is a page of html coding. Which software should I be using to write the code? Karen This is because php scripts are not the same as HTML. HTML is a client side language. Your browser will only understand client side languages. Client side languages are HTML, CSS and Javascript and few others. PHP on the other hand is not a client side language it is known as a server side language. This is why when you open your php file in a browser all you'll see is either a blank screen or your php code. In order to run your PHP scripts they will need to be in a server environment. This doesn't mean you'll need web hosting. You can run your PHP scripts off of your PC. In order to so you will need to install a couple of things. A http server the most popular being Apache and PHP itself. You will need to configure Apache with PHP. The best place to know how to configure Apache with PHP is php.net. As for how to use Apache go to httpd.apache.org Installing Apache and PHP can be quite hard for the first time, however installing them this way gives you a better understanding of how Apache and PHP work. If you do not want to try a manual install then you can go for a pre-packaged AMP setup. There are many available however I recommend WAMP If you go for WAMP please read WAMP documentation for where to place your scripts. If you go for a manual install of Apache and PHP then you need to place your scripts in Apaches DocumentRoot, default is something like C:/Program Files/Apache Foundation/Apache2/htdocs. In order to run your scripts you must open a web browser and then go to http://localhost/ Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-372502 Share on other sites More sharing options...
kazali Posted October 18, 2007 Author Share Posted October 18, 2007 Thanks for all your responses. I have not installed Apache or PHP so I will try one of those. Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-372554 Share on other sites More sharing options...
rlindauer Posted October 18, 2007 Share Posted October 18, 2007 Thanks for all your responses. I have not installed Apache or PHP so I will try one of those. You have to install both. Apache is the webserver. Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-372609 Share on other sites More sharing options...
dommer43 Posted October 19, 2007 Share Posted October 19, 2007 Hey, I remember this utter confusion once upon a time too I ended up finding some nice helper WAMP applications from http://www.codango.com/...though looking at it again I cant recall which...lol, how sad is that? Anyway, check it out on the site and see if one of the automated installers gets you on track Good luck! http://codango.com/php/dir/software/install/windows/ Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-373238 Share on other sites More sharing options...
Moocat Posted October 19, 2007 Share Posted October 19, 2007 IMO, the best way to go is to use linux. my favorite distro is openSUSE. Installing apache, php and mysql took me all of twenty minutes on this machine! plus if i ever need to host files on the interwebs, linux is more stable than windows. plus it's the standard! Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-373260 Share on other sites More sharing options...
BlueSkyIS Posted October 19, 2007 Share Posted October 19, 2007 imo the best way to go is OS X. it is unix, so it too is the standard. MAMP provides a drag-and-drop LAMP installation, no installation, and very rare need to add modules as most are already in there. In fact, I haven't had to add anything now that mcrypt is included. Quote Link to comment https://forums.phpfreaks.com/topic/73824-writing-php/#findComment-373280 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.