SlideShare a Scribd company logo
1 of 3
HOW

PHP
WORKS ?
Client
                User requests a PHP page or a HTML page that includes a PHP
                Script                                                                     Web Server
Hello world I   Via HTTP.
am a PHP Code
                  Server responds to the request by sending the generated
                  HTML page to the User.                                                                <html>
                                                                                                        <head>
                                                                                                           <title> PHP to
                                                                                                        HTML</title>
                                                                                                        </head>
                                                                                                        <body>
                                                                                                               <h1> Hello world
                                                                                                        I am a PHP
                                                                                                        Code </h1>
                                            If a PHP page is requested, server passes                   </body>
                                            the PHP page to the PHP script engine.                      </html>

                                             #hello world PHP script.
                                                                                                        The    PHP       engine
                                             <?php
                                                                                                        parses the given
                                             echo ‚<h1> Hello World I am a PHP                          PHP      script    and
                                             Code</h1>‛;                                                Converts it into HTML
                                             ?>
                                                                                                        And send’s it to the
                                                                                                        browser as shown
                                                                                                        Above.
                                                                                   PHP SCRIPT ENGINE
Client
           User requests a PHP page or a HTML page that includes a PHP
           Script                                                                            Web Server
Robinson   Via HTTP.

             Server responds to the request by sending the generated
             HTML page to the User.                                                                       <html>
                                                                                                          <head>
                                                                                                             <title> PHP to
                                       If a PHP page is requested, server passes
                                                                                                          HTML</title>
                                       the PHP page to the PHP script engine.                             </head>
                                                                                                          <body>
                                       #DataBase PHP script.                                                   <h1> Robinson</h1>
                                       <?php                                                              </body>
                                       $q = ‘SELECT fn FORM persons’;                                     </html>
                                       //run the query
                                       $r = mysqli_query($dbc, $q);
                                       //fetch the data
                                       While($re = mysqli_fetch_array($r)){
                                           echo ‚<h1>{$re[‘fn’]}</h1>‛;                                   The    PHP       engine
                                       }                                                                  parses the given
                                       ?>                                                                 PHP      script    and
                                                                                                          Converts it into HTML
                                                                                                          And send’s it to the
                               PHP engine send’s the query to the MySQL DB engine.                        browser as shown
                               (SELECT fn FROM persons);                                                  Above.
                                                                                     PHP SCRIPT ENGINE


                                  Returns the result of the query (Robinson)
              DATABASE

More Related Content

What's hot

Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixBruce Snyder
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixBruce Snyder
 
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPP
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPPFast & Scalable Front/Back-ends using Ruby, Rails & XMPP
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPPPradeep Elankumaran
 
Consuming RESTful services in PHP
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHPZoran Jeremic
 
PHP Performance with APC + Memcached
PHP Performance with APC + MemcachedPHP Performance with APC + Memcached
PHP Performance with APC + MemcachedFord AntiTrust
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIGert Vanthienen
 
An Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAn Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAdrian Trenaman
 
Improving PHP Application Performance with APC
Improving PHP Application Performance with APCImproving PHP Application Performance with APC
Improving PHP Application Performance with APCvortexau
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureToru Kawamura
 
Apc presentation
Apc presentationApc presentation
Apc presentationguestef8544
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for WindowsFord AntiTrust
 
Php And Web Services
Php And Web ServicesPhp And Web Services
Php And Web Servicesthinkphp
 
PHP and Web Services
PHP and Web ServicesPHP and Web Services
PHP and Web ServicesBruno Pedro
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPLariya Minhaz
 
PHP BASIC PRESENTATION
PHP BASIC PRESENTATIONPHP BASIC PRESENTATION
PHP BASIC PRESENTATIONkrutitrivedi
 

What's hot (17)

Service-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMixService-Oriented Integration With Apache ServiceMix
Service-Oriented Integration With Apache ServiceMix
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPP
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPPFast & Scalable Front/Back-ends using Ruby, Rails & XMPP
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPP
 
Consuming RESTful services in PHP
Consuming RESTful services in PHPConsuming RESTful services in PHP
Consuming RESTful services in PHP
 
Cgi
CgiCgi
Cgi
 
PHP Performance with APC + Memcached
PHP Performance with APC + MemcachedPHP Performance with APC + Memcached
PHP Performance with APC + Memcached
 
ServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBIServiceMix 4 -- Integrating OSGi with JBI
ServiceMix 4 -- Integrating OSGi with JBI
 
An Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESBAn Introduction to Apache ServiceMix 4 - FUSE ESB
An Introduction to Apache ServiceMix 4 - FUSE ESB
 
Improving PHP Application Performance with APC
Improving PHP Application Performance with APCImproving PHP Application Performance with APC
Improving PHP Application Performance with APC
 
Intro to Dynamic Web Pages
Intro to Dynamic Web PagesIntro to Dynamic Web Pages
Intro to Dynamic Web Pages
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 
Apc presentation
Apc presentationApc presentation
Apc presentation
 
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
/* pOrt80BKK */ - PHP Day - PHP Performance with APC + Memcached for Windows
 
Php And Web Services
Php And Web ServicesPhp And Web Services
Php And Web Services
 
PHP and Web Services
PHP and Web ServicesPHP and Web Services
PHP and Web Services
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHP
 
PHP BASIC PRESENTATION
PHP BASIC PRESENTATIONPHP BASIC PRESENTATION
PHP BASIC PRESENTATION
 

Viewers also liked

Graphological test
Graphological testGraphological test
Graphological testAlamgir Khan
 
NetBeansではじめるJava
NetBeansではじめるJavaNetBeansではじめるJava
NetBeansではじめるJavaToru Kano
 
Introducing Viaccess-Orca
Introducing Viaccess-OrcaIntroducing Viaccess-Orca
Introducing Viaccess-OrcaViaccess-Orca
 
(Arsenie boca) cararea imparatiei(1)
(Arsenie boca) cararea imparatiei(1)(Arsenie boca) cararea imparatiei(1)
(Arsenie boca) cararea imparatiei(1)Ifrim Paul
 
Lecture1: Introduction to Psychophysiology
Lecture1: Introduction to PsychophysiologyLecture1: Introduction to Psychophysiology
Lecture1: Introduction to PsychophysiologyIllya Kuznetsov
 
Meezan Islamic Banking
Meezan Islamic BankingMeezan Islamic Banking
Meezan Islamic BankingAlamgir Khan
 
Introduccion a terminologia medica
Introduccion a terminologia medicaIntroduccion a terminologia medica
Introduccion a terminologia medicaOrlando S.m.
 

Viewers also liked (11)

TVOT June 2012
TVOT June 2012TVOT June 2012
TVOT June 2012
 
Hanani & dodit
Hanani & doditHanani & dodit
Hanani & dodit
 
Graphological test
Graphological testGraphological test
Graphological test
 
NetBeansではじめるJava
NetBeansではじめるJavaNetBeansではじめるJava
NetBeansではじめるJava
 
Introducing Viaccess-Orca
Introducing Viaccess-OrcaIntroducing Viaccess-Orca
Introducing Viaccess-Orca
 
(Arsenie boca) cararea imparatiei(1)
(Arsenie boca) cararea imparatiei(1)(Arsenie boca) cararea imparatiei(1)
(Arsenie boca) cararea imparatiei(1)
 
iLike pizza
iLike pizzaiLike pizza
iLike pizza
 
Share point 2010
Share point 2010Share point 2010
Share point 2010
 
Lecture1: Introduction to Psychophysiology
Lecture1: Introduction to PsychophysiologyLecture1: Introduction to Psychophysiology
Lecture1: Introduction to Psychophysiology
 
Meezan Islamic Banking
Meezan Islamic BankingMeezan Islamic Banking
Meezan Islamic Banking
 
Introduccion a terminologia medica
Introduccion a terminologia medicaIntroduccion a terminologia medica
Introduccion a terminologia medica
 

Similar to How php works

Similar to How php works (20)

How to Use PHP in HTML.pdf
How to Use PHP in HTML.pdfHow to Use PHP in HTML.pdf
How to Use PHP in HTML.pdf
 
Web server scripting - Using a form
Web server scripting - Using a formWeb server scripting - Using a form
Web server scripting - Using a form
 
PHP
PHPPHP
PHP
 
Intro to-php-19 jun10
Intro to-php-19 jun10Intro to-php-19 jun10
Intro to-php-19 jun10
 
Phpbasics
PhpbasicsPhpbasics
Phpbasics
 
10_introduction_php.ppt
10_introduction_php.ppt10_introduction_php.ppt
10_introduction_php.ppt
 
Presentation1
Presentation1Presentation1
Presentation1
 
introduction_php.ppt
introduction_php.pptintroduction_php.ppt
introduction_php.ppt
 
10_introduction_php.ppt
10_introduction_php.ppt10_introduction_php.ppt
10_introduction_php.ppt
 
INTRODUCTION TO PHP.ppt
INTRODUCTION TO PHP.pptINTRODUCTION TO PHP.ppt
INTRODUCTION TO PHP.ppt
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
php basics
php basicsphp basics
php basics
 
Lecture8
Lecture8Lecture8
Lecture8
 
Introduction to PHP.ppt
Introduction to PHP.pptIntroduction to PHP.ppt
Introduction to PHP.ppt
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 
php 1
php 1php 1
php 1
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

How php works

  • 2. Client User requests a PHP page or a HTML page that includes a PHP Script Web Server Hello world I Via HTTP. am a PHP Code Server responds to the request by sending the generated HTML page to the User. <html> <head> <title> PHP to HTML</title> </head> <body> <h1> Hello world I am a PHP Code </h1> If a PHP page is requested, server passes </body> the PHP page to the PHP script engine. </html> #hello world PHP script. The PHP engine <?php parses the given echo ‚<h1> Hello World I am a PHP PHP script and Code</h1>‛; Converts it into HTML ?> And send’s it to the browser as shown Above. PHP SCRIPT ENGINE
  • 3. Client User requests a PHP page or a HTML page that includes a PHP Script Web Server Robinson Via HTTP. Server responds to the request by sending the generated HTML page to the User. <html> <head> <title> PHP to If a PHP page is requested, server passes HTML</title> the PHP page to the PHP script engine. </head> <body> #DataBase PHP script. <h1> Robinson</h1> <?php </body> $q = ‘SELECT fn FORM persons’; </html> //run the query $r = mysqli_query($dbc, $q); //fetch the data While($re = mysqli_fetch_array($r)){ echo ‚<h1>{$re[‘fn’]}</h1>‛; The PHP engine } parses the given ?> PHP script and Converts it into HTML And send’s it to the PHP engine send’s the query to the MySQL DB engine. browser as shown (SELECT fn FROM persons); Above. PHP SCRIPT ENGINE Returns the result of the query (Robinson) DATABASE