SlideShare a Scribd company logo
Web Engineering II
Instructor:Engr Muhsin Ali Shah
 Assignments (5%)
 Quizes (10%)
 Attendence (5%)
 Mid-Term (30%)
 Final-Term (50%)
Marks Distribution
Chapter 1
PHP originally stood for:
Personal Home Pages
PHP is now a recursive acronym that stands for:
PHP: Hypertext Preprocessor
 PHP. Three letters that together constitute the name of one of the
world’s most popular programming languages for Web
development, the PHP Hypertext Preprocessor. the language is
today in use on over twenty million Web sites and more than a third
of the world’s Web servers
Introduction to PHP
What is PHP
 PHP is a server-side scripting language, like ASP
 PHP scripts are executed on the server
 PHP supports many databases (MySQL, Informix,Oracle etc.
 PHP is open source and free to download
 PHP files many contain text, HTML tags and scripts
 PHP files are returned to the browser as plain HTML
 PHP supports many databases (MySQL, Informix,Oracle etc.
 PHP files have extension of “.php”, “.php3” or “.phtml”
History
 PHP is a language for creating interactive web sites.
 It was originally called "Personal Home Page Tools"
when it was created in 1994 by Rasmus Lerdorf to keep
track of who was looking at his online CV.
 Mid-1997: students Andi Gutmans and Zeev Suraski
redesigned the PHP language engine and wrote some of
the most popular PHP modules.
 At that time PHP already had its own site, php.net,
run by the computer science community, and was powering
thousands of Web sites.
.
These Dates are recent…
 Version 0.0: Conceived in autumn of 1994.
 Version 1.0: Personal Home Page Tools in early 1995.
 Version 2.0: PHP/FI 1995-1997.
 Version 3.0: PHP 1997-2000.
 Version 4.0: PHP mid-2000.
 Version 4.1: 10 Dec 2001.
 Version 4.2: 22 Apr 2002.
 Version 5.0: 26 February 2009.
.
Unique Features
If you’re familiar with other server-side languages like ASP.NET or JSP,
you might be wondering what makes PHP so special, or so different
from these competing alternatives. Well, here are some reasons:
Performance
 Scripts written in PHP execute faster than those written in other scripting
languages, with numerous independent benchmarks putting the language
ahead of competing alternatives like JSP, ASP.NET, and Perl.
The PHP 5.0 engine was completely redesigned with an optimized
memory manager to improve performance, and is noticeably faster
than previous versions.
.
Unique Features
Portability
 PHP is available for UNIX, Microsoft Windows, Mac OS, and OS/2, and
PHP programs are portable between platforms. As a result, a PHP
application developed on, say, Windows will typically run on UNIX without
any significant issues.
Ease of Use
 Its syntax is clear and consistent, and it comes with exhaustive
documentation for the 5000+ functions included with the core
distributions.
Open Source
 PHP is an open-source project—the language is developed by a
worldwide team of volunteers who make its source code freely
available on the Web, and it may be used without payment of
licensing fees or investments in expensive hardware or software.
Unique Features
Third-Party Application Support
 One of PHP’s strengths has historically been its support for a wide
range of different databases, including MySQL, PostgreSQL,
Oracle, and Microsoft SQL Server. PHP 5.3 supports more than
fifteen different database engines, and it includes a common API for
database access.
 Q: Do I need to compile PHP programs before executing them,
as in Java or C++?
 No, because PHP is an interpreted language. One advantage of an
interpreted language is that it allows you to make changes to your
source code and immediately test these changes, without first
needing to compile your source code into binary form. Skipping the
compilation step makes the development process much faster, and
PHP comes with built-in memory management.
What you need for PHP?
 Install an Apache Server (web server) on a windows or
Linux machine
 Install PHP (server side scripting technlogy) on a
windows or Linux machine
 Install MySQL (database server) on a windows or Linux
machine
 And lots of Configuration work!!! 􀀯
 Alternatively, Just download WAMP Server and install
 It will not only installs Apache, MySQL and PHP on windows
machine but will also configure these softwares.
 Provides you an easy to access interface to run and host
PHP files.
PHP is C++ Style
 PHP is very similar to C++.
 This is because C++ is top banana.
 As a consequence if you know java (also a c++ ), C++ or
indeed almost any other computer science language you pretty
much already know PHP.
 However more than anything PHP is based on Perl.
PHP Tag Styles
 XML Style:
<?php
print “this is XML style”;
?>
 Short Style:
<?
print “this is ASP style”;
?>
Basic Development Concepts
 When developing a PHP application for the Web, the typical
approach is to embed PHP code into one or more standard HTML
documents using special “tags,” or delimiters.
<html>
<head></head>
<body>
<div>
<?php echo sqrt(49); ?>
</div>
</body>
</html>
Basic Development Concepts
 When such document is requested by a user,a PHP aware Web
Server can recognize and execute the php code blocks and
interpolate the resulting output into html document before returning
it to the requesting user.
Writing and Running the Script
 PHP scripts are merely plain-text files containing PHP instructions,
sometimes combined with other odds and ends—JavaScript,
HTML, and so on. So, the simplest way to write a PHP script is to
pop open your favorite text editor and create a file containing some
PHP code, as follows:
<?php
// this line of code displays a famous quotation
echo 'A horse! A horse! My kingdom for a horse!';
?>
Writing and Running the Script
 Save this file to a location under your Web server’s document root,
and name it horse.php. Then, start up your Web browser, and
browse to the URL corresponding to the file location. You should
see something like Figure.
Comments
 Why do we go on about comments so much?
 You can any of the following comment style in php.
 <?
// C style comment
# Perl style comment
/*
C++ multi line comment
*/
?>
Escaping Special Characters
 PHP allows you to escape certain characters by preceding them
with a backslash (). There so-called escape sequences include
Sequence What It Represents
n a line feed character
t a tab
r a carriage return
" a double quotation mark
' a single quotation mark
Difference between echo and print
Echo Print
1)can output one or more
strings
1)can only output one
string, and returns always 1
2)echo can take more than
one parameter when used
without parentheses.
2)print only takes one
parameter.
3)In PHP, echo is not a
function but a language
construct.
3)In PHP, print is not a
really function but a
language construct.
However, it behaves like a
function in that it returns a
value.

More Related Content

What's hot

Java Script
Java ScriptJava Script
Java Script
husbancom
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Edureka!
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
Mohammed Arif
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
Abhishek Sur
 
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in WebJussi Pohjolainen
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
Dhani Ahmad
 
What Is Php
What Is PhpWhat Is Php
What Is Php
AVC
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
Rajamanickam Gomathijayam
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
CPD INDIA
 
Regular Expressions in PHP
Regular Expressions in PHPRegular Expressions in PHP
Regular Expressions in PHP
Andrew Kandels
 
PHP File Handling
PHP File Handling PHP File Handling
PHP File Handling
Degu8
 
Php mysql
Php mysqlPhp mysql
Php forms
Php formsPhp forms
Php forms
Anne Lee
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
Hitesh Santani
 
Php notes
Php notesPhp notes
Php notes
Muthuganesh S
 
JavaScript - Chapter 1 - Problem Solving
 JavaScript - Chapter 1 - Problem Solving JavaScript - Chapter 1 - Problem Solving
JavaScript - Chapter 1 - Problem Solving
WebStackAcademy
 
Node Architecture and Getting Started with Express
Node Architecture and Getting Started with ExpressNode Architecture and Getting Started with Express
Node Architecture and Getting Started with Express
jguerrero999
 
Php technical presentation
Php technical presentationPhp technical presentation
Php technical presentation
dharmendra kumar dhakar
 

What's hot (20)

Java Script
Java ScriptJava Script
Java Script
 
Json
JsonJson
Json
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Introduction to Basic Concepts in Web
Introduction to Basic Concepts in WebIntroduction to Basic Concepts in Web
Introduction to Basic Concepts in Web
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
Php with mysql ppt
Php with mysql pptPhp with mysql ppt
Php with mysql ppt
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 
Regular Expressions in PHP
Regular Expressions in PHPRegular Expressions in PHP
Regular Expressions in PHP
 
PHP File Handling
PHP File Handling PHP File Handling
PHP File Handling
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Php forms
Php formsPhp forms
Php forms
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
Php notes
Php notesPhp notes
Php notes
 
JavaScript - Chapter 1 - Problem Solving
 JavaScript - Chapter 1 - Problem Solving JavaScript - Chapter 1 - Problem Solving
JavaScript - Chapter 1 - Problem Solving
 
Node Architecture and Getting Started with Express
Node Architecture and Getting Started with ExpressNode Architecture and Getting Started with Express
Node Architecture and Getting Started with Express
 
Php technical presentation
Php technical presentationPhp technical presentation
Php technical presentation
 

Similar to PHP LICTURES ..........

Php unit i
Php unit i Php unit i
Php unit i
prakashvs7
 
Php tutorial
Php tutorialPhp tutorial
Php tutorialNiit
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processorSiddique Ibrahim
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
sushil kumar
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
Nguyễn Hoà
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
vigneswaran54
 
PHP.ppt
PHP.pptPHP.ppt
a brief introduction to PHP and how to use it.
a brief introduction to PHP and how to use it.a brief introduction to PHP and how to use it.
a brief introduction to PHP and how to use it.
Raihan Mistry
 
Training ppt
Training pptTraining ppt
Training ppt
nikita vijay
 
Php intro
Php introPhp intro
Php intro
sana mateen
 
PHP.docx
PHP.docxPHP.docx
PHP.docx
NithiyaNithi2
 
Php ppt
Php pptPhp ppt
Php ppt
Sasi Kumar
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Sasi Kumar
 
unitI-Introduction to php.pptx
unitI-Introduction to php.pptxunitI-Introduction to php.pptx
unitI-Introduction to php.pptx
nehasahuji
 
Overview of php
Overview of phpOverview of php
Overview of php
prisense india
 
.Net Development Services VS | PHP Development Services
.Net Development Services  VS | PHP Development Services.Net Development Services  VS | PHP Development Services
.Net Development Services VS | PHP Development Services
Worth Studios Pvt. Ltd.
 
PHP Training In Chandigarh.docx
PHP Training In Chandigarh.docxPHP Training In Chandigarh.docx
PHP Training In Chandigarh.docx
Excellence Academy
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor Introduction
Oto Brglez
 
Word press
Word pressWord press
Word press
Brian Lucas
 

Similar to PHP LICTURES .......... (20)

Php unit i
Php unit i Php unit i
Php unit i
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
PHP.ppt
PHP.pptPHP.ppt
PHP.ppt
 
a brief introduction to PHP and how to use it.
a brief introduction to PHP and how to use it.a brief introduction to PHP and how to use it.
a brief introduction to PHP and how to use it.
 
Training ppt
Training pptTraining ppt
Training ppt
 
Php intro
Php introPhp intro
Php intro
 
PHP.docx
PHP.docxPHP.docx
PHP.docx
 
Php ppt
Php pptPhp ppt
Php ppt
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
unitI-Introduction to php.pptx
unitI-Introduction to php.pptxunitI-Introduction to php.pptx
unitI-Introduction to php.pptx
 
Overview of php
Overview of phpOverview of php
Overview of php
 
.Net Development Services VS | PHP Development Services
.Net Development Services  VS | PHP Development Services.Net Development Services  VS | PHP Development Services
.Net Development Services VS | PHP Development Services
 
PHP Training In Chandigarh.docx
PHP Training In Chandigarh.docxPHP Training In Chandigarh.docx
PHP Training In Chandigarh.docx
 
PHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor IntroductionPHP: Hypertext Preprocessor Introduction
PHP: Hypertext Preprocessor Introduction
 
Word press
Word pressWord press
Word press
 
Programming language
Programming languageProgramming language
Programming language
 

Recently uploaded

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 

Recently uploaded (20)

Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 

PHP LICTURES ..........

  • 2.  Assignments (5%)  Quizes (10%)  Attendence (5%)  Mid-Term (30%)  Final-Term (50%) Marks Distribution
  • 4. PHP originally stood for: Personal Home Pages PHP is now a recursive acronym that stands for: PHP: Hypertext Preprocessor  PHP. Three letters that together constitute the name of one of the world’s most popular programming languages for Web development, the PHP Hypertext Preprocessor. the language is today in use on over twenty million Web sites and more than a third of the world’s Web servers Introduction to PHP
  • 5. What is PHP  PHP is a server-side scripting language, like ASP  PHP scripts are executed on the server  PHP supports many databases (MySQL, Informix,Oracle etc.  PHP is open source and free to download  PHP files many contain text, HTML tags and scripts  PHP files are returned to the browser as plain HTML  PHP supports many databases (MySQL, Informix,Oracle etc.  PHP files have extension of “.php”, “.php3” or “.phtml”
  • 6. History  PHP is a language for creating interactive web sites.  It was originally called "Personal Home Page Tools" when it was created in 1994 by Rasmus Lerdorf to keep track of who was looking at his online CV.  Mid-1997: students Andi Gutmans and Zeev Suraski redesigned the PHP language engine and wrote some of the most popular PHP modules.  At that time PHP already had its own site, php.net, run by the computer science community, and was powering thousands of Web sites. .
  • 7. These Dates are recent…  Version 0.0: Conceived in autumn of 1994.  Version 1.0: Personal Home Page Tools in early 1995.  Version 2.0: PHP/FI 1995-1997.  Version 3.0: PHP 1997-2000.  Version 4.0: PHP mid-2000.  Version 4.1: 10 Dec 2001.  Version 4.2: 22 Apr 2002.  Version 5.0: 26 February 2009. .
  • 8. Unique Features If you’re familiar with other server-side languages like ASP.NET or JSP, you might be wondering what makes PHP so special, or so different from these competing alternatives. Well, here are some reasons: Performance  Scripts written in PHP execute faster than those written in other scripting languages, with numerous independent benchmarks putting the language ahead of competing alternatives like JSP, ASP.NET, and Perl. The PHP 5.0 engine was completely redesigned with an optimized memory manager to improve performance, and is noticeably faster than previous versions. .
  • 9. Unique Features Portability  PHP is available for UNIX, Microsoft Windows, Mac OS, and OS/2, and PHP programs are portable between platforms. As a result, a PHP application developed on, say, Windows will typically run on UNIX without any significant issues. Ease of Use  Its syntax is clear and consistent, and it comes with exhaustive documentation for the 5000+ functions included with the core distributions. Open Source  PHP is an open-source project—the language is developed by a worldwide team of volunteers who make its source code freely available on the Web, and it may be used without payment of licensing fees or investments in expensive hardware or software.
  • 10. Unique Features Third-Party Application Support  One of PHP’s strengths has historically been its support for a wide range of different databases, including MySQL, PostgreSQL, Oracle, and Microsoft SQL Server. PHP 5.3 supports more than fifteen different database engines, and it includes a common API for database access.  Q: Do I need to compile PHP programs before executing them, as in Java or C++?  No, because PHP is an interpreted language. One advantage of an interpreted language is that it allows you to make changes to your source code and immediately test these changes, without first needing to compile your source code into binary form. Skipping the compilation step makes the development process much faster, and PHP comes with built-in memory management.
  • 11. What you need for PHP?  Install an Apache Server (web server) on a windows or Linux machine  Install PHP (server side scripting technlogy) on a windows or Linux machine  Install MySQL (database server) on a windows or Linux machine  And lots of Configuration work!!! 􀀯  Alternatively, Just download WAMP Server and install  It will not only installs Apache, MySQL and PHP on windows machine but will also configure these softwares.  Provides you an easy to access interface to run and host PHP files.
  • 12. PHP is C++ Style  PHP is very similar to C++.  This is because C++ is top banana.  As a consequence if you know java (also a c++ ), C++ or indeed almost any other computer science language you pretty much already know PHP.  However more than anything PHP is based on Perl.
  • 13. PHP Tag Styles  XML Style: <?php print “this is XML style”; ?>  Short Style: <? print “this is ASP style”; ?>
  • 14. Basic Development Concepts  When developing a PHP application for the Web, the typical approach is to embed PHP code into one or more standard HTML documents using special “tags,” or delimiters. <html> <head></head> <body> <div> <?php echo sqrt(49); ?> </div> </body> </html>
  • 15. Basic Development Concepts  When such document is requested by a user,a PHP aware Web Server can recognize and execute the php code blocks and interpolate the resulting output into html document before returning it to the requesting user.
  • 16. Writing and Running the Script  PHP scripts are merely plain-text files containing PHP instructions, sometimes combined with other odds and ends—JavaScript, HTML, and so on. So, the simplest way to write a PHP script is to pop open your favorite text editor and create a file containing some PHP code, as follows: <?php // this line of code displays a famous quotation echo 'A horse! A horse! My kingdom for a horse!'; ?>
  • 17. Writing and Running the Script  Save this file to a location under your Web server’s document root, and name it horse.php. Then, start up your Web browser, and browse to the URL corresponding to the file location. You should see something like Figure.
  • 18. Comments  Why do we go on about comments so much?  You can any of the following comment style in php.  <? // C style comment # Perl style comment /* C++ multi line comment */ ?>
  • 19. Escaping Special Characters  PHP allows you to escape certain characters by preceding them with a backslash (). There so-called escape sequences include Sequence What It Represents n a line feed character t a tab r a carriage return " a double quotation mark ' a single quotation mark
  • 20. Difference between echo and print Echo Print 1)can output one or more strings 1)can only output one string, and returns always 1 2)echo can take more than one parameter when used without parentheses. 2)print only takes one parameter. 3)In PHP, echo is not a function but a language construct. 3)In PHP, print is not a really function but a language construct. However, it behaves like a function in that it returns a value.