+ All Categories
Home > Documents > PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology ...

PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology ...

Date post: 26-Mar-2015
Category:
Upload: sophia-mcbride
View: 219 times
Download: 0 times
Share this document with a friend
Popular Tags:
18
PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology http://www.php.net PHP - Presentation, ETH Zürich July 02 © Rainer Baumann, [email protected]
Transcript
Page 1: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP

Hypertext Pre-ProcessorCurrently Version 4

The Server Side Scripting Technology

http://www.php.net

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Page 2: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Overview

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

• About My Person• Introduction to PHP • History of PHP• Dynamic Web Contents -> Server Side• The PHP Engine• Teamwork• PHP Features & Functions• Demo• The PHP Language• Look Out

Page 3: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Rainer Baumann

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

2000 Foundation Member

1995 New Company

KryptKp II/41

Master Studies in Computer Science

T h e T e c h n o l o g y N e t w o r kT h e T e c h n o l o g y N e t w o r k

Page 4: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – The PHP

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

PHP file extensions in the web:.php / .php4 / .php3 / .phtml

PHP is often used for midsize search engines

Page 5: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – History

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

• 1994 –

• 1997 –

• 1998 –

• 1999 –

• 2000 –

PHP/FI, Personal Home Page / Forms InterpreterMacro Interpreter for visitors on-line resume, C LikeSet of Perl Scripts (Rasmus Lerdorf)

PHP/FI 2, Fully C implemented

PHP 3 (Andi Gutmans und Zeev Suraski)Extendable, Object Oriented Approach

Zend Engine, totally new to handle complexity of applications and improve efficiency

PHP 4, Hypertext Pre-Processor, a lot of new things

Page 6: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – The Success

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

PHP availability today

Open Source -> Implementation for most systems available

• Standard Apache Module• Linux distributions (RedHat, SUSE, …)• Unix (Sun)

• Supported by Microsoft IIS

Page 7: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Dynamic Web Content

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Client Server

•CGI•Perl

•Server-APIs•Java Servlets

•SSI•Server Side Scripting

•PHP•ASP (VB)•JSP

•API

•Client Side Scripting•Java Script•VB Script•CSS

•Plug Ins•Flash

•Applet•Java

•Hilfsprogramme

Internet

More Techniques: XML, SOAP, RMI, CORBA ...

Page 8: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Server Side

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Server

CGI – Module

NS - API

PHP - Module

Java ServletStatic Process

Java Servlet – ModulePHP Engine

Static ProcessHTML Passable

LibrariesDynamic Loadable

CGI - New ProcessStdout send to Client

SSI – ModuleOperating System Calls

Includable in HTML

Page 9: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – The Engine (Zend)

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Page 10: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Teamwork

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Comparison of different server side web application technologies

-> Teams of 2

-> Read Instructions

Page 11: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Teamwork Questions

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Which Technology would you why use for:

• A sometimes used person database

• A often used dynamic web content builder

• A often accessed online shop

• A rarely used huge online compiler

Page 12: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Teamwork Comparison

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Comparison > Difficult > Application Dependant > Large Differences

Performance Comparison of Alternative Solutions For Web-To-Database Applications (CGI, Java Servlets and PHP)http://rain.vislab.olemiss.edu/~ww1/Slide_Show_Images/SCC_Amanda/SCC_Amanda.pdf Web Application Benchmarkshttp://www.chamas.com/bench/

Page 13: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Main Features

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

• Easy database access (SyBase, MySQL, mSQL, Oracle, DB2, Informix, …)

• Supports all major internet standards (SNMP, POP, IMAP, NNTP, LDAP, …)

• Hundreds of functions as• dynamic generation of PDF, JPEG, ..• XML processing

• Open source and extendable

• -> Function List

Page 14: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Function List

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

Page 15: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Example

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

JFZH Intern

JFZH DBhttp://jfzh.ch

PHP Use

Public Area•Agenda•News und Berichte•Ortsgruppen•Vorstand•Formulare

Closed Area•Self Authentifcating

JFZH DB•Personen (Adresse / Bild / Status)•Ortsgruppen (Funktionen / Web)•OG-Services (Email / Export)•Services (Backup / Beiträge / Hierarchie)

JFZH Intern•Agenda Mutation•News und berichte Mutation•File Austausch

Page 16: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – Language Fragments

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

// Number$a = 5;$b = $a + 8;

// String$h = “hallo“;

if ($a < 5) { $b = $a + 10;} else {   $b = $a * 2;}

for ($i = 0; $i < 10; $i++) {  echo $i;}

// Array$m[1] = “xyz“;

Page 17: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP – More Language Fragments

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]

function foo($arg) { return $arg x 5;}

class Lab {var $ident; function get_Ident() {

retrurn $ident; }

}

$l = new Lab; $l->get_Ident();

Page 18: PHP - Title PHP Hypertext Pre-Processor Currently Version 4 The Server Side Scripting Technology  PHP - Presentation, ETH Zürich July.

PHP - Presentation, ETH Zürich July 02© Rainer Baumann, [email protected]


Recommended