PHP: Hypertext Preprocessor

Slides:



Advertisements
Similar presentations
PHP I.
Advertisements

E-Commerce CMM503 – Lecture 8 Stuart Watt Room C2.
Session 1 & 2BBK P1 Module5-May-2007 : [‹#›] PHP: The Basics.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Introduction to PHP MIS 3501, Fall 2014 Jeremy Shafer
Kyung Hee University 1 1 Application Layer. 2 Kyung Hee University Position of Application Layer.
PHP/ASP Robert Nelson & Will Vanlue BA370 November 4 th, 2005.
IST 221 Internet Concepts and Applications Introduction to PHP.
Website Development Introducing PHP The PHP scripting language Syntax derives from C, Java and Perl Open Source Links to MySql database.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Multiple Tiers in Action
DT228/3 Web Development JSP: Directives and Scripting elements.
Java Server Pages Russell Beale. What are Java Server Pages? Separates content from presentation Good to use when lots of HTML to be presented to user,
PHP Server-side Programming. PHP  PHP stands for PHP: Hypertext Preprocessor  PHP is interpreted  PHP code is embedded into HTML code  interpreter.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
PHP Workshop ‹#› PHP: The Basics. PHP Workshop ‹#› What is it? PHP is a scripting language commonly used on web servers. –Stands for “PHP: Hypertext Preprocessor”
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
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
ALBERT WAVERING BOBBY SENG. Week Whatever: PHP  Announcements/questions/complaints.
CP3024 Lecture 3 Server Side Facilities. Lecture contents  Server side includes  Common gateway interface (CGI)  PHP Hypertext Preprocessor (PHP) pages.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
Lecture Note 3: ASP Syntax.  ASP Syntax  ASP Syntax ASP Code is Browser-Independent. You cannot view the ASP source code by selecting "View source"
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
School of Computing and Information Systems CS 371 Web Application Programming PHP - Basics Serving up web pages.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
CMPS 211 JavaScript Topic 1 JavaScript Syntax. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction.
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Fall 2004CSI University of Ottawa Introduction to PHP Basic principles and syntax.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
CSE 154 LECTURE 5: INTRO TO PHP. URLs and web servers usually when you type a URL in your browser: your computer looks up the.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
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.
PHP Workshop ‹#› أطلق إبداعك 2 أطلق إبداعك 2 مدرس معتمد من مركز زووم PHP: The Basics.
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
Fall 2004CSI University of Ottawa Introduction to PHP Basic principles and syntax.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
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,
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
CGS 3066: Web Programming and Design Spring 2016 PHP.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 13 Scott Marino.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
ASP – Web Programming Class  Ravi Anand. ASP – Active Server Pages What is ASP? - Microsoft Technology - Can Run using IIS/PWS/Others - Helps us create.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
PHP using MySQL Database for Web Development (part II)
CGS 3066: Web Programming and Design Spring 2017
Introduction to Dynamic Web Programming
Chapter 5 Scripting Language
WWW and HTTP King Fahd University of Petroleum & Minerals
CS 371 Web Application Programming
DBW - PHP DBW2017.
PHP (PHP: Hypertext Preprocessor)
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Chapter 5 Scripting Language
PHP / MySQL Introduction
Chapter 27 WWW and HTTP.
Software Engineering for Internet Applications
PHP.
HYPERTEXT PREPROCESSOR BY : UMA KAKKAR
IntroductionToPHP Static vs. Dynamic websites
Introduction to PHP.
PHP an introduction.
SEEM 4540 Tutorial 4 Basic PHP based on w3Schools
Presentation transcript:

PHP: Hypertext Preprocessor

PHP An HTML embedded scripting language JSP, ASP (executes on webserver) VBScript, Javascript (executes in browser) PHP is (normally) used on a webserver Output from a php script is usually HTML Aim is to allow web developers to write dynamically generated pages quickly Much syntax borrowed from C, Java and Perl “Glue” between lots of other programs Database friendly Client/Server application friendly Widely used open source scripting language Started in 1995, under continual development

PHP and HTML PHP is usually part of an HTML page Special HTML tag <?php php program ?> Webserver sends html file to php interpreter Interpreter looks for <?php … ?> tag and interprets code Output (may be html) replaces php tags Other html passes through unchanged Interpreter sends output back to webserver Page sent to remote browser

Basic features All the usual programming language features (plus some…) Instruction separation As in C or PERL, new lines are not important. instructions end with a semicolon (;) character Comments C (/* … */) C++ (//) Unix Shell (#) Variables Start with a dollar ($) symbol Programmer needn’t specify datatype Some special variables from outside PHP

More features Arrays Functions Control Structures Actually an “ordered map” “map” from a key to a value Use square brackets [] to access arrays Value can also be an array Some predefined arrays for getting information from webserver Functions Hundreds of built-in functions Control Structures Conditional Statements If, else, elseif Loops while, do-while, for, foreach, switch, break, continue

Working with forms Reason PHP was invented! HTML forms Can use HTTP ‘POST’ or ‘GET’ methods to send data to webserver PHP predefined variables $_GET array $_POST array Elements are named as in the HTML form

Sessions Each request from a browser is independent Need to keep track of which request comes from which browser PHP makes this simple with a $_SESSION array variable – any data stored here will be maintained for the browser ‘session’

Local filesystem Can read and write to other files on the webserver Access files using a handle Lots of functions to access files fopen – open file and get a handle ffeof – test for end of file fgets – read a line from a file fwrite – write a line to a file fclose – close a file flock – test for and lock, or unlock, a file Writing to a file Must lock file first Shouldn’t allow user to interrupt script while we write our data [ignore_user_abort(true);]