How to open a PHP file on XAMPP
This tutorial concerns the procedure for opening a PHP file on XAMPP. We will do our best to make sure you understand this guide. I hope you will like this blog How to open a PHP file on XAMPP. If your answer is yes, please share after reading this.
Check how to open a PHP file on XAMPP
PHP is the most popular web programming language. PHP code can be run as a web server module or as a command line interface. To run PHP for the web you need to install a web server like Apache and you also need a database server like MySQL. There are several web servers for running PHP programs such as WAMP and XAMPP. The WAMP server is compatible with Windows and XAMP is compatible with Windows and Linux. In this article, you will learn how to run a PHP program on a Xampp server.
How to open a PHP file in XAMPP
- Go to the Apache Friends website and download XAMPP for Windows. For easier installation, download the “Self-extracting RAR file” from the base package. Wait for the download to finish and open it to start installing XAMPP. Click on the “Install” button to start extracting the file. When the command prompt screen appears, press the “Enter” key for each question to accept the default settings.
- Start the XAMPP program. On startup, XAMPP loads in your icon bar. The icon is orange with a white bone shape in the center. Click the icon to expand Control Panel. Click 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 depend on a MySQL database to run.
- 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 saved as such; They must have the file extension “.php”. Open any web browser on your desktop and enter “localhost” in the address box. The browser will open a list of files stored in the “HTDocs” folder on your computer. Click on the link to a PHP file and open it to run a script.
- Create the folders you need to test the PHP files in the “HTDocs” folder. If you create a folder called “scripts”, use the address “localhost / scripts” to open them in your browser.
Final words: How to open a PHP file on XAMPP
hope you will understand this item How to open a PHP file on XAMPP, if your answer is no, you can request anything through the contact forum section linked to this article. And if your answer is yes, then share this article with your family and friends.