Home / PHP / Introduction and Installing PHP on Local Host

Introduction and Installing PHP on Local Host

Introduction and Installing PHP

PHP is the most popular server scripting language. It was created by Rasmus Lardof in 1994. Initially it was designed for web development but now it is also used for general purpose programming language. PHP initially stands for Personal Home Page now it is acronym for PHP: Hyper Text Preprocessor. PHP is widely used for web development . The most popular social media website Facebook and most popular blogging websites WordPress, Joomla and Drupal written in PHP.  Nearly 75% of websites currently using PHP as server scripting language. A web developer should learn HTML, CSS, Javascript and PHP. Without PHP you cannot develop dynamic websites. Although there are many server scripting languages like ASP.net  and Node.js. But PHP is most popular and open source scripting language. Its syntax is similar to C language.  If you have learned C language then you you will learn PHP easily.

Installing and compiling PHP

As PHP is server scripting language so to compile PHP code you need a server. PHP program  runs on XAMPP , WAMP etc. But I recommend XAMPP.  XAMPP includes PHP, MySQL, Apache web server, Perl and File Zilla.

Download XAMPP from this site https://www.apachefriends.org/download.html.

Step 1

Install XAMPP on C drive. You can install XAMPP on D and E drive but I recommend C.

Step 2

Go to start Menu and Open XAMPP. From XAMPP control panel run Apache web server and MySQl. MySQL is an open source RDBMS and Apache is world’s most famous web server.

Running PHP program using XAMPP

Step 3

Now write your first PHP Program and save it in C:\xampp\htdocs as “first.php”.

PHP Program Code

You must have to save your PHP program in htdocs file in C/xampp/htdocs . Do not save any other location it will not work.

Step 4

Now open browser and write localhost/first.php or enter http://127.0.0.1/first.php.


Running PHP local host

Congratulation! You have successfully created your first php program.

About Abid

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!