logo CBCE Skill INDIA

Welcome to CBCE Skill INDIA. An ISO 9001:2015 Certified Autonomous Body | Best Quality Computer and Skills Training Provider Organization. Established Under Indian Trust Act 1882, Govt. of India. Identity No. - IV-190200628, and registered under NITI Aayog Govt. of India. Identity No. - WB/2023/0344555. Also registered under Ministry of Micro, Small & Medium Enterprises - MSME (Govt. of India). Registration Number - UDYAM-WB-06-0031863

How to run PHP code in XAMPP?


How to run PHP code in XAMPP

To run PHP code in XAMPP, follow these steps:

 

  1. Install XAMPP: Download and install XAMPP from the official website (https://www.apachefriends.org/index.html). Follow the installation instructions specific to your operating system (Windows, macOS, or Linux).

  2. Start XAMPP: After installation, start the XAMPP control panel. On Windows, you can find it in the Start menu. On macOS, you can find it in the Applications folder.

  3. Start Apache Server: In the XAMPP control panel, click on the "Start" button next to Apache. This will start the Apache web server.

  4. Create or Move Your PHP Files: You need to place your PHP files in the appropriate directory. By default, for XAMPP, you can put your PHP files in the htdocs directory. On Windows, it's typically located at C:\xampp\htdocs. On macOS, it's in /Applications/XAMPP/htdocs.

  5. Access Your PHP Files in the Browser: Open your web browser and type http://localhost/ in the address bar. If everything is set up correctly, you should see the XAMPP dashboard. You can access your PHP files by placing them in the htdocs directory and navigating to http://localhost/your_php_file.php.

  6. Test Your PHP Code: Create a new PHP file (e.g., test.php) in the htdocs directory.

  7. Access Your PHP File: Open your web browser and navigate to http://localhost/test.php. You should see "Hello, World!" displayed on the page.

 

That's it! You've successfully set up XAMPP and run PHP code on your local server. You can now create and test PHP applications locally before deploying them to a live server.

 

Thank you,

Popular Post:

Give us your feedback!

Your email address will not be published. Required fields are marked *
0 Comments Write Comment