PHP - INTODUCTION

Scripting language

A scripting language is a language that interprets scripts at runtime.
SCRIPT
-A script is a set of programming instructions that is interpreted at runtime.
-Scripts are usually embedded into other software environments.
-The purpose of the scripts is usually to enhance the performance or perform routine tasks for an application. 

TWO TYPES OF SCRIPT

Server side scripts are interpreted on the server. PHP is an example of server side script that is interpreted on the server.
Client side scripts are interpreted by the client application. JavaScript is an example of a client side script that is interpreted by the client browser. 
Both PHP and JavaScript can be embedded into HTML pages.

Difference between scripting languages and other languages

Programming language vs Scripting language
-Programming language has all the features needed to develop complete applications, while Scripting language are mostly used for routine tasks.
-The code of Programming language has to be compiled before it can be executed. The code of Scripting language is usually executed without compiling.
- Programming language does not need to be embedded into other languages. Scripting language is usually embedded into other software environments.

What is PHP?

-The acronym PHP initially stood for Personal Home Pages. As of version 3, it stands for PHP Hypertext pre­processor. 
-It is a general purpose server side scripting language that is used to develop;
   -Static websites
  -Dynamic websites
  -Web applications
-PHP scripts can only be interpreted on a server that has PHP installed. The client computers accessing the PHP scripts require a web browser only.
- A PHP file contains PHP tags and ends with the extension “.php”. 
-A PHP file looks like:
<?php
  echo  ” Welcome to PHP ”;
?>

-A PHP file can also contain tags such as HTML and client side scripts such as JavaScript.


Recommended Pre­requisites for learning PHP


-Basics of HTML.
-Database management systems ( DBMS).
-JavaScript and XML.

Why PHP?

-PHP is open source and free.
-Short learning curve compared to other languages such as JSP, ASP etc.
-Large community document
-Most web hosting servers support PHP by default unlike other languages such as ASP that need IIS. This makes   PHP a cost effective choice.
-PHP is regular updated to keep abreast with the latest technology trends.
Other benefit that you get with PHP is that it’s a server side scripting language; this means you only need to install it on the server and client computers requesting for resources from the server do not need to have PHP installed; only a web browser would be enough.
-PHP has in built support for working hand in hand with MySQL; this doesn’t mean you can’t use PHP with other database management systems. You can still use PHP with
Postgres
Oracle
MS SQL Server
ODBC etc.
-PHP is cross platform; this means you can deploy your application on a number of different operating systems such as windows, Linux, Mac OS etc.

PHP Vs. ASP, JSP AND CFML

ASP – Active Server Pages 
JSP – Java Server Pages 
CFML – Cold Fusion Markup language

PHP Files

File extension and Tags In order for the server to identify our PHP files and scripts, we must save the file with the “.php” extension. Older PHP
file extensions include
.phtml
.php3
.php4
.php5
.phps
PHP was designed to work with HTML, and as such, it can be embedded into the HTML code.
<HTML>
    <PHP CODE>
</HTML>


Post a Comment

0 Comments