Steps to run PHP Scripts Using XAMPP
1. As said above, you can download XAMPP for free. You can get your free copy from here.
2. Open the downloaded file and install the applications.
3. Once installed, run the XAMPP control panel and start Apache and MySQL servers. Enable MySQL if your program needs database.
4. Click on the ‘Explore’ button on the XAMPP control panel. The new window opens with file explorer. Search for the ‘htdocs’ folder.
4. htdocs folder is the folder Apache server points to. In this folder you need to place the PHP scripts your want to run.
5. Open the browser and enter the address http:// localhost/yourphpscript.php, where yourphpscript is the script name of your php code.
6. You can even create sub folders inside htdocs to place and run php scripts. If you are using folders insider htdocs, then you need to enter the following path in the browser address bar.
http://localhost/foldername/yourphpscript.php where ‘foldername’ is the name of the folder which contains php scripts created inside your htdoc folder.
7. Your browser will execute the script and show the output.
Leave a Reply