XAMPP is the most popular software package which is used to set up a PHP development environment for web services by providing all
the required software components. During the process of software deployment,
most of the web servers use almost similar components, so use of XAMPP
provides easy transition from local server to live server. XAMPP is a
AMP stack which stands for Cross platform, Apache, MySQL,
PHP, perl with some additional administrative software tools such as
PHPMyAdmin (for database access), FileZilla FTP server, Mercury mail server and
JSP Tomcat server.
Other commonly known software packages like XAMPP are WAMP, LAMP, and others.
The XAMPP server is used to test PHP pages. It works as local server. It contains a MySQL database to manage or save data on a local server.
Advantages of XAMPP:
Software components of XAMPP:
Steps to install XAMPP on Windows:
Now that you have successfully installed Xampp on your computer. In this section we will create a very simple PHP script that displays the text "Hello, world!" in the browser window.
Ok, click on the control-panel icon somewhere on your Windows task bar or inside xampp folder or select the "xampp directory" where it is installed and find xampp-control ,double click on it and a window will pop up,
then start apache web server, Now got to the "htdocs" directory through navigating the
C:\xampp\htdocs. Create a subdirectory in "htdocs" directory let's say "project".
Now open up your favorite code editor and create a new PHP file then type the following code:
<?php // Display greeting message echo "Hello, world!"; ?>
Now save this file as "hello.php" in your project folder (located at
C:\xampp\htdocs\project), and view the result in your browser through visiting this URL:
Alternatively, you can access the "hello.php" file through selecting the
http://localhost/project option and then select the file .
PHP can be embedded within a normal HTML web page. That means inside your HTML document you can write the PHP statements, as demonstrated in the follwoing example:
<!DOCTYPE HTML> <html> <head> <title>PHP Application</title> </head> <body> <?php // Display greeting message echo 'Hello World!'; ?> </body> </html>
You will learn more about PHP Programming in upcoming chapters.