Saturday, 10 November 2012

php basic(Hello World!)

                                                                      <?php
                                                                              echo "Hello World!";
                                                                       ?>

what we did here is we printed out the string 'Hello World!'.Now before we start coding i am assuming that readers dont know what php is and what does it do.
There are two types of programming (1) Client side programming
                                                       (2) Server side programming

Client side programming is a class of computer programs that executes on client side i.e browser.This is an important part of website .Because what we see on our browser those buttons and texts they are all creation of client side programming.There are many language that is used as client side scripting such as Java Script.
Server side programming on contrary does not execute on browser or client side instead they execute on servers.So when the above code is executed on web server it returns plain html and send it to client.The below picture explains it more beautifully     


Whenever you type a web address and hit enter the server sends a request to the server and the server processes the request and interprets the php and return the html file which hold 'Hello World!' and prints it to the client's browser.There are lots of client side programming language like ASP(Active Server Pages),JSP(Java Server Pages) and last but not the least PHP. Among these all which one is the best is still a matter of argument.But i am more fond of PHP as it is easy and it is free it has the widest support across the web and it executes really fast which makes it our language of choice.
In the next post we will be doing a little php coding.Stay tuned.






No comments:

Post a Comment