Saturday, July 20, 2013

How to start with PHP programming

How to starts with PHP programming

what is php?

    php is server side scripting language designed for web development. PHP stands for hypertext preprocessor. PHP is widely used open source general purpose scripting language specially for web development. PHP need not need to write in separate file. We can just embedded it into HTML. PHP code is interpreted by a web servers and it generate the php pages.

why php?

  • PHP is most popular scripting language
  • PHP can be deployed on most of web server, on almost every operating system and platform free of charge
  • Easy to learn
  • fast development

Required Software's 

   1)Apache server:

    PHP require apache server for serving the php page request. Apache is simple https server for server the http requests
  2) Mysql database 
   PHP support any database  but mysql with php is famous.


Start PHP development :

Step -1 : Download XAMPP

  • Xampp stands for xmp apache mysql php and perl. It is all in one package for php
  •  So easy to download and install XAMPP than seperate php and mysql
  • XAMPP provides control panel which make simple start and stop apache and mysql services





Step-2 : Install XAMPP 
                You can find simple article on how to install XAMPP on windows just Click Here for article. Follow the steps as show in article.
                Then start the apache server service by clicking start on the xampp control panel. In xampp htdocs default root directory to store the php web pages we change this path by editing config file of xampp. 
Then start the apache serever and check the server started or not by opening the http:\\localhost  in your web browser then it display the homepage of xampp. 

 

Create the first hello world program in php :

Crate index.php file in htdocs folder of xampp
Copy the below sample hello world code

<?
    echo "Hello world";
?>
 

Save index.php file.
Open the web browser and type url http:\\localhost\index.php. Then the output of index.php hello world is display in the browser.


Best of luck for programming and do some fun with php.........

3 comments:

  1. very informative.. helped me a lot.

    http://www.techdarting.com

    ReplyDelete
  2. I have interest in learning PHP and this article let me know how to start it exactly, thanks for sharing this amazing stuff.
    PHP training course

    ReplyDelete