Ticker

6/recent/ticker-posts

PHP (Introduction)

PHP INTRODUCTION
PHP is a powerful and widely-used open source server-side scripting language that is used to develop different types of dynamic websites.



FEATURES OF PHP

1. PHP stands for "PHP Hypertext Preprocessor" and its an example of "Open Source Programming Language"

2. PHP is a "Server Side Scripting Language" that created by "Rosmus Leardof" in 1995 by using C and Perl language.

3. PHP work virtually with all types web servers, including Microsoft's Internet Information Server (IIS) but its mostly used with Apache Server because its also an open source application.

4. Zend Engine: Its a core component of PHP that is used to fast execution of PHP programs.

5. PHP can be integrated with the number of popular databases, including MySQL, Oracle, Sybase, and Microsoft SQL Server but MySQL mostly prefer because its also an example of open source application.

6. PHP is loosely type language, therefore we don't need to declare a variable before use.

7. PHP is a case sensitive hence any variable or function name should be used in proper form.

8. Every PHP variable should be declare with $ symbol and every PHP statement should be terminate with semicolon (;)

9. PHP use interpreter, hence its also known as interpreter language.

10. PHP support number of editors such Notepad, Notepad ++, Dreamweaver, etc.



Different Types of PHP Tools -->

XAMPP-->
            X stands for "Any Operating System"
          
            A stands for "Apache"

            M stands for "MYSQL"

            P stands for "PHP"
          
            P stands for "Perl"


LAMP-->
            L stands for "Linux"
     
            A stands for "Apache"

            M stands for "MYSQL"

            P stands for "PHP"


WAMP-->
            W stands for "Window"
     
            A stands for "Apache"

            M stands for "MYSQL"

            P stands for "PHP"


Steps to Create and Execute PHP Programs
      
1) Open any IDE (Integrated Development Environment) such Notepad, Notepad++, 
           Dreamweaver, etc.

Write the following PHP Script code.
Program Syntax

<?php
Statement;
Statement;
?>


2) Save this file in Root directory of server (C://xampp/htdocs) with (.php) extension.. 


3) To see program output, open the web browser and write you program name with "localhost" server.

Example
http://servername/filename.extension

Actual Syntax: 
http://localhost/first.php



A Simple PHP Program Example

<?php
echo"My First PHP Program";
?>

Program Explanation: In above program <?php is a php tag, which open the PHP code bock and it should be close with?>
echo: This command is used to print any text statement and variable value on output window and any HTML tag can be easily embed in echo command.

Example
<?php
echo"<font size=5>Welcome in my first program";
?>










Post a Comment

0 Comments