PHP Environment Setup

Here you will learn about how to setup environment for PHP programming.

PHP Environment Setup - First Step

Before setting up your environment for PHP programming, download XAMPP from internet and install it on your computer system.

What to do after Installing XAMPP

Now open XAMPP, the XAMPP window will looks like this:

xampp php environment setup

After successfully installing the XAMPP software on your system, now you have to setup and start your server through XAMPP to run PHP program.

Click on the Start button, present at the right side of Apache to start your server.

After clicking on the Apache start button, your XAMPP window will looks like this:

php environment setup

What to do after Setting XAMPP

Now open any text editor such as Notepad, Notepad++ and type the following PHP code inside that text editor.

<html>
<head>
   <title>PHP Environment Setup - fresherearth</title>
</head>
<body>
<h2>Environment Setup for PHP Programming</h2>
<?php 
   echo "<p>This is just a demo PHP code.</p>";
   echo "<p>Checking how to save and run PHP program.</p>";
?>
</body>
</html>

Save the above PHP code with name fresherearth.php in the directory C:\xampp\htdocs\.

Now open any browser and type localhost/fresherearth.php and press ENTER key to see your PHP code's output present in the file fresherearth.php file. Here is the demo output of the above PHP code:

environment setting for php programming

PHP Online Test


« Previous Tutorial Next Tutorial »