Thursday 9 April 2015

PHP with HTML

PHP(Hypertext Preprocessor) is a server side scripting language that is used to develop dynamic web pages. PHP also have capability to communicate with dayabase. PHP free software released under PHP License, they don't contains GNU norms.
There are several versions of PHP released:

1)PHP version 2 : Released on june 8,1995.
2)PHP version 3: Released on 1997.
3)PHP version 4: Released on May 22, 2000.
4) PHP version 5: Released on July 13, 2004.
5)PHP version 6: this is under development.

Features of PHP :
1) Access control : Provides built in web based configuration screen to handle access control configuration.
2) File upload support : Allow users to upload files to a web server. PHP provides the multipurpose internet mail extension decoding process to upload the files onto the server.
3) HTTP based authentication control : Allows the user to create customized HTTP-based authentication mechanism for the web server.
4) Conditional statements and loops : Allow user to work with loops and conditional statements same as C language.
5) Extended regular expressions : Supports all regular expression operations. They are mainly used for pattern matching, pattern substitution and general string manipulation.
6) Access logging : Allow user to record the number of times website  or web page accessed.
7) Safe mode support : Allow multiple users to run php scripts on the same server simultaneously.
8) Open source : Allow user to work with multiple software development languages.
9) Third party application support : PHP also supports third party appliactions like MYSQL database etc.
10) Extensible architecture  : Allow the user to read and write in various formats, such as GIF, JPEG, PNG. Sends and receive emails using SMTP, IMAP, POP3.PHP also allow user to access C libraries, java classes.

PHP code can be embedded in HTML and XHTML in three ways :
1) XML style : <?php
                        //php code
                        ?>
2) Short style : <?
                         //php code
                         ?>
3) Script style : <script language ="php"> 
                           //php code
                         </script>

Creating PHP script : PHP scripts are plain text files containing PHP instructions. Let's see how to create PHP script with HTML:

<html>
<head><title>first php</title>
</head>
<body>
<?php
echo "this is my first PHP.";
?>
</body>
</html>    

output will be:


We should remember that for running PHP scripts we must have PHP installed on system.

Official link for PHP  download   http://php.net/

No comments:

Post a Comment