How to install PHP on a local server?

Step-1: Go to the XAMPP website and download XAMPP for Windows OS.

Step-2: Let’s say you install it in C: drive. Now, go to the htdocs folder,

Step-3: Open htdocs and create a new folder myphp for your project. All our project files will get stored here.

Step-4: Open the folder myphp and add a file with the extension .php. adding a file, index.php

Step-5: add the following code:

<?php
 echo “<h1>Welcome to Webeduclick!</h1>”;
?>

 

Step-6: Now, go to start and type XAMPP Control Panel. Click on it and you can see the following XAMPP Control Panel dialog box, Click on Start for Apache. This will start the Apache server.

Step-7: Now type your project folder name myphp/index.php then enter it. Our first PHP program web page is visible.