- PHP Basics
- Learn PHP
- PHP Comments
- PHP Data Types
- PHP Variables
- PHP Operators
- PHP echo
- PHP print
- PHP echo vs. print
- PHP if else
- PHP switch
- PHP for Loop
- PHP while Loop
- PHP do...while Loop
- PHP foreach Loop
- PHP break and continue
- PHP Arrays
- PHP print_r()
- PHP unset()
- PHP Strings
- PHP Functions
- PHP File Handling
- PHP File Handling
- PHP Open File
- PHP Create a File
- PHP Write to File
- PHP Read File
- PHP feof()
- PHP fgetc()
- PHP fgets()
- PHP Close File
- PHP Delete File
- PHP Append to File
- PHP Copy File
- PHP file_get_contents()
- PHP file_put_contents()
- PHP file_exists()
- PHP filesize()
- PHP Rename File
- PHP fseek()
- PHP ftell()
- PHP rewind()
- PHP disk_free_space()
- PHP disk_total_space()
- PHP Create Directory
- PHP Remove Directory
- PHP Get Files/Directories
- PHP Get filename
- PHP Get Path
- PHP filemtime()
- PHP file()
- PHP include()
- PHP require()
- PHP include() vs. require()
- PHP and MySQLi
- PHP and MySQLi
- PHP MySQLi Setup
- PHP MySQLi Create DB
- PHP MySQLi Create Table
- PHP MySQLi Connect to DB
- PHP MySQLi Insert Record
- PHP MySQLi Update Record
- PHP MySQLi Fetch Record
- PHP MySQLi Delete Record
- PHP MySQLi SignUp Page
- PHP MySQLi LogIn Page
- PHP MySQLi Store User Data
- PHP MySQLi Close Connection
- PHP Misc Topics
- PHP Object Oriented
- PHP new Keyword
- PHP Cookies
- PHP Sessions
- PHP Date and Time
- PHP GET vs. POST
- PHP File Upload
- PHP Image Processing
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 - 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:
« Previous Tutorial Next Tutorial »