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:
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:
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 - CodesCracker</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 codescracker.php in the directory C:\xampp\htdocs\.
Now open any browser and type localhost/codescracker.php and press ENTER key to see your PHP code's output present in the file codescracker.php file. Here is the demo output of the above PHP code:
« Previous Tutorial Next Tutorial »