Saturday, 16 March 2019

Overview of PHP

 PHP is a server side scripting language, and a powerful tool for making dynamic Web Sites.  PHP  started as a small open source project and letter people found it very usefull now its used in many large website like as favebook.com or youtube.com
 *  PHP  is a stands for PHP: Hypertext Preprocessor.
 *  PHP is a server side scripting language that is embedded in HTML.
 * It van be integrated with a number of popular databases like MySQL(mysql is included with wamp or xampp etc), or Microsoft SQL Server.
 *  PHP  supports a large number of protocols such as POP3, IMAP, and LDAP. PHP5 is supporting the object oriented programming.
 *  PHP Syntax is Like as C language.

Print Hellow world in PHP

to print a string in php its uses echo , and using echo we are going to display Hello, World! and the code is given below
<html>
    <head>
    <title>Hello World</title>
    </head>
    <body>
    <?php echo "Hello, World!"; ?>
    </body>
    </html>
    

The most popular PHP script writting styles

There is several style to write a php code like as start with <?php and end with ?> , also can be start with <? and end with ?> and there is another style to write a php code which is start with <script language = "php"> and end with </script> The sample is given below. in case of writting a php code user must use the page extension as .php

<?php PHP code goes here ?>
    Or
    <? PHP code goes here ?>
  Or
    <script language = "php"> PHP code goes here </script>
    

What Can PHP Do?

With PHP we are not limited to output HTML. You can output images, PDF files etc. we can also output any text, such as XHTML and XML. * PHP can generate dynamic page content * PHP can create, open, read, write, delete, and close files on the server * PHP can collect form data * PHP can send and receive cookies * PHP can add, delete, modify data in your database * PHP can be used to control user-access * PHP can encrypt data

Why PHP?

* PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) * PHP is compatible with almost all servers used today (Apache, IIS, etc.) * PHP supports a wide range of databases * PHP is free. Download it from the official PHP resource: www.php.net * PHP is easy to learn and runs efficiently on the server side

No comments:

Post a Comment