How to Run a PHP project in XAMPP server?

  • The Apache Friends' XAMPP set of Web development tools makes it simple to run PHP (Personal Home Pages) scripts locally on your PC. 
  • Manually installing a Web server and PHP takes extensive configuration knowledge, but installing XAMPP on Windows merely necessitates the execution of an installer package. 
  • This package includes MySQL, FileZilla, Mercury, Perl, and Tomcat in addition to a Web server and PHP. These programs allow you to test complete web pages on your own computer without having to transfer everything to a web server.


1st step

  • Download XAMPP for Windows from the Apache Friends website
  • Download the "self-extracting RAR archive" from the Basic Package for the simplest installation. Wait for the download to finish before opening it and starting the XAMPP installation. 
  • To begin the file extraction, click the "Install" button. When the Command Prompt screen displays, press the "Enter" key to accept the default settings for each question.

2nd step

  • Begin by running the XAMPP application. When you start XAMPP, it automatically loads onto your icon tray. The icon is orange and features a white bone-like shape in the middle. Expand the Control Panel with a single click on the icon. 
  • To start your Apache Web server, click the "Start" button next to "Apache." When Apache is up and running, the word "Running" is underlined in green next to it. Start "MySQL" as well if your PHP programs require a MySQL database to function.

3rd step

  • Place your PHP files in the "htdocs" folder on your C: disc, which is under the "XAMMP" folder. Your Web server's file path is "C:xampphtdocs." Make sure your PHP files are saved as such; the ".php" file extension is required. 
  • On your desktop, open any Web browser and type "localhost" into the address bar. The browser will display a list of files in your computer's "htdocs" folder. To run a script, click the link to a PHP file and open it.

4th step

  • Under the "htdocs" folder, make whatever directories you need to test PHP files. If you create a folder called "scripts," you can open it in your browser with the address "localhost/scripts."

Post a Comment

Previous Post Next Post