How to Run a PHP File in XAMPP
How to Web Development

How to Run a PHP File in XAMPP

PHP is one of the best languages for website development and one of the most critical web backend programming languages in the coding world. There are numerous web servers available that can help you for successively PHP programs like WAMP and XAMPP. XAMPP format is supported in both Linux and Windows.

The XAMPP is a coding tool of the Web development era. Which is created by Apache Friends to makes it easy to run PHP (Personal Home Pages) on your workstation? Manual installation of a Web server and PHP requires details confirmation on coding.

This set can install MySQL, FileZilla, Mercury, Perl, and Tomcat. These all applications are allowing you to test full websites on your computer. At the time of installation, they don’t require to upload every information on an online Web server. We will discuss more details on how to run a PHP file in XAMPP.

Here is the list of few Steps on How to Run a PHP File in XAMPP : 

Step 1

  • To Download XAMPP for Windows, go to the Apache Friends website
  • Download the Basic Packages of the self-extracting RAR archive available for the most effortless installation.
  • After you begin installing XAMPP, you need to wait for the download to finish and open a file. 
  • To start the file extraction, click on the “Install” button. 
  • Press the “Enter” key, Once Command Prompt Shelter appears, at each question to accept the default settings.

Step 2

  • Start the XAMPP program to run PHP File. 
  • XAMPP loads itself into the icon tray When it started. 
  • This icon colour is orange with a white bone shape in its centre area. 
  • Click the icon to increase the Control Panel performance. 
  • To start your Apache Web server with the click on the “Start” button that is next to “Apache”.
  • The word “Running” will display next to it, When Apache is running and highlighted in green. 
  • If your PHP scripts depend on a MySQL database to run, then Also start “MySQL.”

Step 3

  • You need to place your PHP file in the “htdocs” folder by located under the “XAMMP” folder on your C: drive (Workstation). 
  • For your Web Server, The file path is “C:\xampp\htdocs”. 
  • They must have the “.php” file extension for saving you PHP files. 
  • Open up in any Web Browser on your desktop and enter the “localhost” command into your address box. 
  • The browser will open in your computer a list of files stored under the “htdocs” folder on your workstation. 
  • To open it to run a script, click on the link to a PHP file and.

Step 4

  • To test PHP files in under the “htdocs” folder, you must create any folders you need then use the address “localhost/scripts” to open them in your browser. 
  • If you create a folder named “scripts,” 

Related posts

Why Migration from Magento 1 to 2 is Important and How to Achieve it?

Abhishek Agarwal

Where Would a Tracking Device Be On a Car?

Vikas Varma

Where to Find The Genuine Uber Clone Script That Works?

Team TMT

What Makes a Marketing Agency Website Great?

Team TMT

What is Agile Project Management Methodology?

Team TMT

What is a Virtual Dedicated Server and Why does a Business need it

Vikas Varma

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More