How to run PHP files on localhost?

October 30, 2008 by: Ranjith

1. First download the xampp from http://www.apachefriends.org/en/xampp.html
2. Extract the file and double click the exe. This will install Mysql and Apache servers.
3. Once the installation is complete, you will find XAMPP under Start / Programs / XAMPP. You can use the XAMPP Control Panel to start/stop all servers. Start Mysql and Apache servers.
4. Write a test.php file and copy it in to C:/Program Files/XAMPP/htdocs/
5. To run the php file, you just need to brows http://localhost/test.php

Note: You can also create any folder inside htdocs and past test.php inside the folder. If you create a folder called test then the address will become http://localhost/test/test.php

Share/Bookmark:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Furl
  • StumbleUpon
  • Technorati
  • email
Similar posts:

Comments

53 Responses to “How to run PHP files on localhost?”
  1. AKHILESH says:

    thank u…ranjith……… for ur post….. itz working

  2. ben says:

    Helped me refresh some old stuffs. thanks

  3. anandan says:

    thank u very muchbefor read u r site i use lots of method to execute it cant works, now i know how to execute php file very welllll…thanks again

Leave a Reply