Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.

Slides:



Advertisements
Similar presentations
UFCE8V-20-3 Information Systems Development 3 (SHAPE HK)
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to JavaScript
1 Database Driven Web Application Clients Application Servers including web servers Database Server Traditional client-server (2-tier architecture): client:
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
BY: ALBERTO CABEZAS 4/19/2010. INTRODUCTION: PHP is considered today as one of the most famous scripting languages. PHP is widely used as a general purpose.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
Learning Web development. 3(+1) Tier architecture PHP script Remote services Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC)
Intermediate PHP (1) Data Structures, Functions, Basic OO & Error Handling.
Multiple Tiers in Action
Scripting Languages and PHP. Origins Rasmus Lerdorf ‘Personal Home Pages’. Zeev Surashi and Andi Gutmans Open Source PHP version 4 Full information on.
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
 2004 Prentice Hall, Inc. All rights reserved. Chapter 25 – Perl and CGI (Common Gateway Interface) Outline 25.1 Introduction 25.2 Perl 25.3 String Processing.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
1 Open Source Programming. -Introduction to PHP -PHP installation /wamp server installation for PHP environment -PHP syntax -PHP variables -PHP Strings.
PHP and MySQL Week#1  Course Plan.  Introduction to Dynamic Web Content.  Setting Up Development Server Eng. Mohamed Ahmed Black 1.
Web Programming with PHP (1). -Computer programming (often shortened to programming or coding) is the process of writing, testing, debugging/troubleshooting,
An Introduction to Web Technologies Ankit Jain 4 th Year, Computer Engg Head – DCETECH.COM.
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 03.
Introduction to PHP. PHP PHP is the Hypertext Pre-processor –Script language –Embedded into HTML –Runs as Apache module –Can use DB (MySQL, Oracle, Microsoft.
PHP: Hypertext Processor Fred Durao
UFCEKG-20-2 Data, Schemas & Applications Lecture 4 Server Side Scripting & PHP.
CSC 318 WEB APPLICATION DEVELOPMENT.  Introduction to Server Scripting language  Client VS Server  Introduction to PHP  PHP Files and Syntax  Function.
Copyright © Curt Hill PhP History and Introduction.
CS346 - Javascript 1, 21 Module 1 Introduction to JavaScript CS346.
INTERNET APPLICATION DEVELOPMENT For More visit:
Introduction to PHP (1) Background, Data Types, Control Structures & Functions.
COP 3813 Intro to Internet Computing Prof. Roy Levow PHP.
PHP TUTORIAL. HISTORY OF PHP  PHP as it's known today is actually the successor to a product named PHP/FI.  Created in 1994 by Rasmus Lerdorf, the very.
Nael Alian Introduction to PHP
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
Server & Client  Client: Your computer  Server: Powerful & Expensive computer. Requires network access.
November 2003Bent Thomsen - FIT 6-11 IT – som værktøj Bent Thomsen Institut for Datalogi Aalborg Universitet.
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
Introduction to PHP Advanced Database System Lab no.1.
What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports.
1 CSC 301 Web Programming Charles Frank. PHP – Stands for:  Personal Home Page (originally),  PHP: Hypertext Preprocessor (now; follows GNU’s recursive.
Yasar Hussain Malik - NISTE. PHP Origins Rasmus Lerdorf PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP Hypertext Processor’ Other key.
UFCE8V-20-3 Information Systems Development 3 PHP (1) : Data Types, Control Structures, Data Structures, String Handling & Input/Output.
IT ELECTIVE 2.  Web server Can refer to either the hardware (the computer) or the software (the computer application) that helps to deliver content that.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
PHP Introduction PHP is a server-side scripting language.
Chap 2 – Getting Started COMP YL Professor Mattos.
1 PHP Pattadon Sintusak ID PHP Programmingintroduction2 Content History of PHP What’s PHP? Purpose of PHP Structure of PHP Language Reference.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
JavaScript: A short introduction Joseph Lee Created by Joseph Lee.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 13 Scott Marino.
Introduction to PHP. PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP.
Web Database Programming Using PHP
Module 1 Introduction to JavaScript
Introduction to Dynamic Web Programming
CSC 301 Web Programming Charles Frank.
Web Database Programming Using PHP
PHP / MySQL Introduction
PHP Introduction.
PHP.
Web DB Programming: PHP
Web Programming with PHP (1)
Presentation transcript:

Introduction to PHP

PHP Origins Rasmus LerdorfRasmus Lerdorf (born Greenland, ed Canada) PHP originally abbreviation for ‘Personal Home Pages’, now ‘PHP Hypertext Processor’ Other key developers: Zeev Surashi and Andi Gutmans (Israel) Open Source PHPPHP version current at UWE Due to upgrade to PHP 5

Scripting languages A scripting language is: –often evolved not designed –cross-platform since interpreter is easy to port –designed to support a specific task – PHP -> Web support –un-typed variables (but values are typed) –implicit variable declaration –implicit type conversion –stored only as script files –compiled on demand –may run on the server (PHP) or the client (Javascript) What design and development are involved in using a scripting language like PHP for development in place of a compiled language (Java in JSP,.NET)?

PHP details Procedural language –Compare with Javascript which is event-driven C-like syntax - { } ; Extensive Function Library Good Web-server integration –Script embedded in HTML –Easy access to form data and output of HTML pages Not fully object-oriented –Java is fully object oriented – all functions have to be in a class –In PHP, classes are additional but quite simple to use

PHP and HTML HTML-embedded –PHP scripts are essentially HTML pages with the occasional section of PHP script. – PHP script is enclosed in the tag pair:

Free format - white space is ignored Statements are terminated by semi-colon ; Statements grouped by { … } Comments begin with // or a set of comments /* */ Assignment is ‘=’: $a=6 Relational operators are, == ( not a single equal) Control structures include if (cond) {..} else { }, while (cond) {.. }, for(sstartcond; increment; endcond) { } Arrays are accessed with [ ] : $x[4] is the 5th element of the array $x – indexes start at 0 Associative Arrays (hash array in Perl, dictionary in Java) are accessed in the same way: $y[“fred”] Functions are called with the name followed by arguments in a fixed order enclosed in ( ) : substr(“fred”,0,2) Case sensitive - $fred is a different variable to $FRED C-like language

Function library Basic tasks –String Handling –Mathematics – random numbers, trig functions.. –Regular Expressions –Date and time handling –File Input and Output And more specific functions for- –Database interaction – MySQL, Oracle, Postgres, Sybase, MSSQL.. –Encryption –Text translation –Spell-checking –Image creation –XML

String Handling String literals (constants) enclosed in double quotes “ ” or single quotes ‘ ’ Within “”, variables are replaced by their value: – called variable interpolation. “My name is $name, I think” Within single quoted strings, interpolation doesn’t occur Strings are concatenated (joined end to end) with the dot operator “key”.”board” == “keyboard” Standard functions exist: strlen(), substr() etc Values of other types can be easily converted to and from strings – numbers implicitly converted to strings in a string context. Regular expressions be used for complex pattern matching.

3(+1) Tier architecture PHP script Remote services Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC) Database Server SQL Client application HTTP HTML Web Service tables DHTML SMS vision touch voice SMS system

Learning PHP Start with just the basics, installing a script to output an HTML page Understand how PHP supports interaction with the Browser or other clients Understand how PHP supports integration with databases – MySQL Understand how PHP supports integration with other applications – Web services