Reputation: 14011
I want to do a sample program in PHP on Windows XP.
Do I need any special software to get this to work?
I am afraid that I simply open notepad type the PHP program and save it with php extension. Then I open it with the browser as a HTML file. But it does not work.
Please help
Thanks in advance
Upvotes: 0
Views: 4734
Reputation: 1
i would like to share that before starting PHP we have to set environment for that and then we can start working with PHP.
http://code.freefeast.info/php-tutorials/setting-up-the-environment-for-php-php-tutorial/
Upvotes: 0
Reputation: 4357
Some answers containing the hint for using wamp. You should better use the Zend Server Community Edition.
This is also free and can be downloaded here: http://www.zend.com/de/community/zend-server-ce
This contains Apache, Mysql, PHP and some Zend related Tools. Benefit: its much better preconfigured than wamp.
Upvotes: 1
Reputation: 158081
However you decide to install a webserver and php (or just php and use it in the console like someone mentioned):
Apache (Very, very easy)
Microsoft (Not tested this myself)
Upvotes: 5
Reputation:
The simplest way - use www.microsoft.com/web platform installer. get the whole stack to run PHP all from one place.
Upvotes: 0
Reputation: 488444
You need to have a web server with PHP installed on your PC to make this work.
I highly recommend installing wampserver on your computer. It is a Windows installer that will put PHP, MySQL and Apache in your computer and let you manage all the services and such very easily. If you have problems getting it to work, you can also try out XAMPP, although I've never used it myself.
Upvotes: 5
Reputation: 4555
I use XAMPP, works out of the box with his installer and is more than enough for a simple developer windows environment.
Upvotes: 0
Reputation: 1187
Since you have IIS on the windows cd I would suggest you go to control panel, install/uninstall programs and click on windows components and install IIS. Then install ASP.NET 3.5 from www.asp.net and finally install Phalanger from http://www.php-compiler.net/
That will give you the benefit of both worlds, you can program in ASP.NET using PHP as the language, you can use only PHP if you prefer that or you can mix using ASP.NET/C# on some pages and PHP on other pages within the same application.
Upvotes: 0
Reputation: 151046
you can simply install PHP, and then run the program and redirect the output
php foo.php > output.html
and then use any browser to open up that html file.
Upvotes: 0