How to run a php file?

India
June 13, 2011 3:32pm CST
I'm new in php learning. I need to know how to rum a php file. Please give me step to step information to run php files.
2 responses
@gabzreal (136)
• Philippines
15 Jun 11
install xampp in your computer..locate the htdocs folder where you installed your xampp ex.if its in drive c: ... c:\xampp\htdocs put your php files or folder inside the htdocs folder. then go to your browser ex. internet explorer or firefox type in the address bar.: http://localhost/xampp/ if your php files is inside a folder ex. you put it inside a folder named gptvailbhav91 http://localhost/xampp/gptvailhav91
• India
15 Jun 11
hi gabzreal, how much is the installation size of xampp? Is it free to use or we have to pay for that? I have apache tomcat. Do you know how to work with apache tomcat? Or there is same way with tomcat too?
• India
16 Jun 11
This is really informative 'gabzreal'. I'm really thankful to u. :)
@gabzreal (136)
• Philippines
16 Jun 11
the installation size of xampp is 66mb. it is free to use. it is a package some kind of all in one package application.the software includes apache 2.2.17, Mysql 5.5.8, PHP 5.3.5,phpMyAdmin 3.3.9,FileZilla FTP Server o.9.37 and Tomcat 7.0.3, tomcat is included in that software and it is easy to install. while tomcat alone is just an apache server.i think u need to install mysql,php software.
@lovedude (4447)
• India
14 Jun 11
For that you need to install wamp.. first install wamp in your system.. in that you will have www folder.. you have to put your php files in that folder.. start wamp server.. and in your browser "http://localhost" it will open that php console.. select your project or php file to run..
• India
15 Jun 11
can we do the same with apache tomcat? Is there any other way with apache tomcat?
@rajeev075 (1961)
• India
12 Jan 12
hey! lovedude I just want to know why it not working in my browser? I had installed wamp and the placed my php file in the folder as you said but when i run locahost with http://localhost or via http://127.0.0.1/ it says "It works!" but when i includes my php file name there it just displays the php file content and not show me the working. How do it solve this problem? Can you help?