The XAMPP suite of Web development tools, So using web development tools we can make it easy to run PHP scripts locally on our personal computer. Manual installation of a Web server and PHP requires in-depth configuration knowledge, but installing XAMPP on Windows only requires running an installer package. This package installs not only a Web server and PHP but also MySQL, Perel, FileZiall and Tomcat. These applications allow testing of full websites on your own desktop without the need to upload everything to an online Web server.


Go to the Apache Friends website and download XAMPP for Windows. For the easiest install, download the Basic Package’s “self-extracting RAR archive.” Wait for the download to finish and open it to begin installing XAMPP. Click the “Install” button to start the file extraction. When the Command Prompt screen appears, press the “Enter” key at every question to accept default settings.

Start the XAMPP server. When started, XAMPP loads itself into your icon tray.Single-click the icon to expand the Control Panel. Click on the “Start” button next to “Apache” to start your Apache Web server. When Apache is running, the word “Running” will appear next to it, highlighted in green. Also start “MySQL” if your PHP scripts are having database operations.

Tray XAMPP Icon:

Before start XAMPP Server:

After XAMPP Start:

 


Place your PHP files in the “HTDocs” folder located under the “XAMMP” folder on your C: drive. The file path is “C:\xampp\htdocs” for your Web server. Make sure your PHP files are must save with “.php” file extension. Open the any Web browser on your desktop and enter “localhost” into the address box. The browser will open a list of files placed under the “HTDocs” folder in your computer. Click on the link to a PHP file and open it to run a script.

Create new folder you need to test PHP files in your “HTDocs” folder. If you create a folder named “php,” then use the address “localhost/php” to open them in your browser.

0 Shares