SlideShare a Scribd company logo
1 of 27
PHP
How do websites work?
• Just like the files that are stored in your computer, websites also basically files that are
stored in another computer called the server.
• Many servers are together connected through the internet.
• And this why, when you open a link, that particular file from that server gets loaded on
your computer and you see that particular website.
What are frontend and backend?
Prerequisite for starting with Web Development
Frameworks !!
• A framework basically is like the Legos, with which you make a structure.
• They are like the building blocks created by someone else, and you use these to make
your own website, and use them as and how you want.
Web Server
• Web server is a computer where the web content is stored.
• Web site is collection of web pages while web server is a software that
respond to the request for web resources.
• Eg:
• The software performs a similar role to a restaurant host.
• When you arrive at a restaurant, the host greets you, checks your booking
information, and takes you to your table.
• Performs the role of the restaurant’s maître d’ by handling communications with the
website, handling your requests, and making sure that other modules are ready to
serve you.
• Also like the busboy clearing tables. It cleans the memory, cache and modules and
clears them for new website visitors.
• In a similar way, the webserver checks for the web page you have requested.
Web Server — Market Leaders
The five leading web servers in the market are:
• Apache HTTP Server
• Microsoft Internet Information Services
• Lighttpd
• Nginx Web Server
• Sun Java System Web Server
What is ?
• PHP stands for Hypertext Pre-Processor which is a recursive acronym.
• PHP is a scripting language used to develop static and dynamic
webpages and web applications.
Here are a few important things you must know about PHP:
• PHP is an Interpreted language, hence it doesn't need a compiler.
• To run and execute PHP code, we need a Web server on which PHP must be
installed.
• PHP is a server side scripting language, which means that PHP is executed on
the server and the result is sent to the browser in plain HTML.
• PHP is open source and free.
History of PHP
• Created by Rasmus Lerdorf in 1994. Initially developed for HTTP usage
logging and server-side form generation in Unix.
• elePHPant – The Mascot.
• Personal Home Page
• Track the hits on the Websites.
• According to W3techz, 79.2% of web is still powered by PHP.
• 20 Million Websites
• 1 Million Web Servers
Why PHP?
• Slow website speed.
• Bad user experience.
• Poor security features.
HTTP
• A protocol used to access the data on the World Wide Web (www).
• The HTTP protocol can be used to transfer the data in the form of
plain text, hypertext, audio, video, and so on.
• HTTP is simpler than FTP as HTTP uses only one connection, i.e., no
control connection to transfer the files.
• HTTP is used to carry the data in the form of MIME-like format.
• The HTTP differs from the SMTP in the way the messages are sent
from the client to the server and from server to the client.
What is Apache Web Server?
• Apache HTTP Server is a free and open-source web server that
delivers web content through the internet.
• It was revealed that the name originated from the respect of the
Native American tribe for its resiliency and durability.
• Apache is just one component that is needed in a web application
stack to deliver web content.
• One of the most common web application stacks involves LAMP, or
Linux, Apache, MySQL, and PHP.
• Apache is considered open source software, which means the original
source code is freely available for viewing and collaboration.
• One of the pros of Apache is its ability to handle large amounts of
traffic with minimal configuration.
• Some of the most popular modules that can be added are SSL, Server
Side Programming Support (PHP), and Load Balancing configs to
handle large amounts of traffic.
• Apache can also be deployed on Linux, MacOS, and Windows.
Why Apache Web Server?
How does Apache Web Server Work?
• Apache functions as a way to communicate over networks from client
to server using the TCP/IP protocol.
• The Apache server is configured via configs files in which modules are
used to control its behavior.
• Apache listens to the IP addresses configured in its config files that
are being requested.
PHP Syntax Rules
• Adding php code inside the PHP tags is known as Escaping to php.
• <?php ... ?>
• Apart from the standard code can also use the Short-open tags:
• <? ... ?>
• HTML script tags, like we do for adding JavaScript code in HTML
document:
• <script language="PHP"> ... </script>
• Every expression in PHP ends with a semicolon ;
• Commenting on php
• Both single line and multi-line comments are supported in PHP.
• For single line comment, we can either use # or // before the comment line.
• And for multi-line comments, we use /* ... */.
• PHP is case sensitive, which means that a variable $tiger is not same as
$Tiger. Both of these, represent two different variables here.
• But all the predefined keywords and functions like if, else, echo etc. are case
insensitive.
<?php
echo "Hello, World!";
ECHO "Hello, World!";
?>
• PHP uses curly braces to define a code block.
Features of PHP
Is PHP the right language?
• PHP is open source and free, hence you can freely download, install and start developing using it.
• PHP has a very simple and easy to understand syntax, hence the learning curve is smaller as compared
to other scripting languages like JSP, ASP etc.
• PHP is cross platform, hence you can easily develop and move/deploy your PHP code/project to almost
all the major operating systems like Windows, Linux, Mac OSX etc.
• All the popular web hosting services support PHP. Also the web hosting plans for PHP are generally
the amongst the cheapest plans because of its popularity.
• Popular Content Management Systems like Joomla, Drupal etc. are developed in PHP and if you want
to start your own website, you can easily do that with PHP.
• With PHP, you can create static and dynamic webpages, perform file handling operations, send emails,
access and modify browser cookies, and almost everything else that you might want to implement in
your web project.
• PHP is fast as compared to other scripting languages like JSP and ASP.
• PHP has in-built support for MySQL, which is one of the most widely used Database management
system.
Uses of PHP
To further fortify your trust in PHP, here are a few applications of this
amazing scripting language:
• It can be used to create Web applications like Social Networks(Facebook, Digg),
Blogs(WordPress, Joomla), e-commerce websites(Open Cart, Magnetos etc.) etc.
• Command Line Scripting. You can write PHP scripts to perform different operations on
any machine, all you need is a PHP parser for this.
• Sending Emails or building email applications because PHP provides with a robust email
sending function.
• WordPress is one of the most used blogging(CMS) platform in the World, and if you know
PHP, you can try a hand in WordPress plugin development.

More Related Content

Similar to Introduction to PHP.pptx

Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processorSiddique Ibrahim
 
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemetApurva Tripathi
 
PhP Training Institute In Delhi
PhP Training Institute In DelhiPhP Training Institute In Delhi
PhP Training Institute In DelhiDivyaSharma84779
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xamppJin Castor
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext PreprocessorMrsRLakshmiIT
 
Chapter 1
Chapter 1Chapter 1
Chapter 1Uma Sam
 
Introduction to Server-Side Development with PHP.ppt
Introduction to Server-Side Development with PHP.pptIntroduction to Server-Side Development with PHP.ppt
Introduction to Server-Side Development with PHP.pptDestaBelayneh1
 
Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015iScripts
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1ADARSH BHATT
 
PHP for web development
PHP for web development PHP for web development
PHP for web development loviedigital
 
PHP LICTURES ..........
PHP LICTURES ..........PHP LICTURES ..........
PHP LICTURES ..........Rashid Ahmad
 
1. introduction to php and variable
1. introduction to php and variable1. introduction to php and variable
1. introduction to php and variableNurAliaAqilaMuhalis
 
Web development with php
Web development with phpWeb development with php
Web development with phpAnneSofia1
 

Similar to Introduction to PHP.pptx (20)

Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php
PhpPhp
Php
 
What is PHP?
What is PHP?What is PHP?
What is PHP?
 
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemet
 
Web design EJ3
Web design    EJ3Web design    EJ3
Web design EJ3
 
PhP Training Institute In Delhi
PhP Training Institute In DelhiPhP Training Institute In Delhi
PhP Training Institute In Delhi
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
 
Php hypertext Preprocessor
Php hypertext PreprocessorPhp hypertext Preprocessor
Php hypertext Preprocessor
 
Apache
Apache Apache
Apache
 
Chapter 1
Chapter 1Chapter 1
Chapter 1
 
Introduction to Server-Side Development with PHP.ppt
Introduction to Server-Side Development with PHP.pptIntroduction to Server-Side Development with PHP.ppt
Introduction to Server-Side Development with PHP.ppt
 
Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015Advanced PHP Web Development Tools in 2015
Advanced PHP Web Development Tools in 2015
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
PHP for web development
PHP for web development PHP for web development
PHP for web development
 
PHP LICTURES ..........
PHP LICTURES ..........PHP LICTURES ..........
PHP LICTURES ..........
 
Php vs asp
Php vs aspPhp vs asp
Php vs asp
 
1. introduction to php and variable
1. introduction to php and variable1. introduction to php and variable
1. introduction to php and variable
 
Php reports sumit
Php reports sumitPhp reports sumit
Php reports sumit
 
Web development with php
Web development with phpWeb development with php
Web development with php
 

Recently uploaded

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Recently uploaded (20)

My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Introduction to PHP.pptx

  • 1. PHP
  • 2.
  • 3. How do websites work? • Just like the files that are stored in your computer, websites also basically files that are stored in another computer called the server. • Many servers are together connected through the internet. • And this why, when you open a link, that particular file from that server gets loaded on your computer and you see that particular website.
  • 4. What are frontend and backend?
  • 5. Prerequisite for starting with Web Development
  • 6. Frameworks !! • A framework basically is like the Legos, with which you make a structure. • They are like the building blocks created by someone else, and you use these to make your own website, and use them as and how you want.
  • 7. Web Server • Web server is a computer where the web content is stored. • Web site is collection of web pages while web server is a software that respond to the request for web resources. • Eg: • The software performs a similar role to a restaurant host. • When you arrive at a restaurant, the host greets you, checks your booking information, and takes you to your table. • Performs the role of the restaurant’s maître d’ by handling communications with the website, handling your requests, and making sure that other modules are ready to serve you. • Also like the busboy clearing tables. It cleans the memory, cache and modules and clears them for new website visitors. • In a similar way, the webserver checks for the web page you have requested.
  • 8.
  • 9. Web Server — Market Leaders
  • 10. The five leading web servers in the market are: • Apache HTTP Server • Microsoft Internet Information Services • Lighttpd • Nginx Web Server • Sun Java System Web Server
  • 11. What is ? • PHP stands for Hypertext Pre-Processor which is a recursive acronym. • PHP is a scripting language used to develop static and dynamic webpages and web applications. Here are a few important things you must know about PHP: • PHP is an Interpreted language, hence it doesn't need a compiler. • To run and execute PHP code, we need a Web server on which PHP must be installed. • PHP is a server side scripting language, which means that PHP is executed on the server and the result is sent to the browser in plain HTML. • PHP is open source and free.
  • 12.
  • 13. History of PHP • Created by Rasmus Lerdorf in 1994. Initially developed for HTTP usage logging and server-side form generation in Unix. • elePHPant – The Mascot. • Personal Home Page • Track the hits on the Websites. • According to W3techz, 79.2% of web is still powered by PHP. • 20 Million Websites • 1 Million Web Servers
  • 14. Why PHP? • Slow website speed. • Bad user experience. • Poor security features.
  • 15. HTTP • A protocol used to access the data on the World Wide Web (www). • The HTTP protocol can be used to transfer the data in the form of plain text, hypertext, audio, video, and so on. • HTTP is simpler than FTP as HTTP uses only one connection, i.e., no control connection to transfer the files. • HTTP is used to carry the data in the form of MIME-like format. • The HTTP differs from the SMTP in the way the messages are sent from the client to the server and from server to the client.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20. What is Apache Web Server? • Apache HTTP Server is a free and open-source web server that delivers web content through the internet. • It was revealed that the name originated from the respect of the Native American tribe for its resiliency and durability. • Apache is just one component that is needed in a web application stack to deliver web content. • One of the most common web application stacks involves LAMP, or Linux, Apache, MySQL, and PHP.
  • 21. • Apache is considered open source software, which means the original source code is freely available for viewing and collaboration. • One of the pros of Apache is its ability to handle large amounts of traffic with minimal configuration. • Some of the most popular modules that can be added are SSL, Server Side Programming Support (PHP), and Load Balancing configs to handle large amounts of traffic. • Apache can also be deployed on Linux, MacOS, and Windows. Why Apache Web Server?
  • 22. How does Apache Web Server Work? • Apache functions as a way to communicate over networks from client to server using the TCP/IP protocol. • The Apache server is configured via configs files in which modules are used to control its behavior. • Apache listens to the IP addresses configured in its config files that are being requested.
  • 23. PHP Syntax Rules • Adding php code inside the PHP tags is known as Escaping to php. • <?php ... ?> • Apart from the standard code can also use the Short-open tags: • <? ... ?> • HTML script tags, like we do for adding JavaScript code in HTML document: • <script language="PHP"> ... </script> • Every expression in PHP ends with a semicolon ;
  • 24. • Commenting on php • Both single line and multi-line comments are supported in PHP. • For single line comment, we can either use # or // before the comment line. • And for multi-line comments, we use /* ... */. • PHP is case sensitive, which means that a variable $tiger is not same as $Tiger. Both of these, represent two different variables here. • But all the predefined keywords and functions like if, else, echo etc. are case insensitive. <?php echo "Hello, World!"; ECHO "Hello, World!"; ?> • PHP uses curly braces to define a code block.
  • 26. Is PHP the right language? • PHP is open source and free, hence you can freely download, install and start developing using it. • PHP has a very simple and easy to understand syntax, hence the learning curve is smaller as compared to other scripting languages like JSP, ASP etc. • PHP is cross platform, hence you can easily develop and move/deploy your PHP code/project to almost all the major operating systems like Windows, Linux, Mac OSX etc. • All the popular web hosting services support PHP. Also the web hosting plans for PHP are generally the amongst the cheapest plans because of its popularity. • Popular Content Management Systems like Joomla, Drupal etc. are developed in PHP and if you want to start your own website, you can easily do that with PHP. • With PHP, you can create static and dynamic webpages, perform file handling operations, send emails, access and modify browser cookies, and almost everything else that you might want to implement in your web project. • PHP is fast as compared to other scripting languages like JSP and ASP. • PHP has in-built support for MySQL, which is one of the most widely used Database management system.
  • 27. Uses of PHP To further fortify your trust in PHP, here are a few applications of this amazing scripting language: • It can be used to create Web applications like Social Networks(Facebook, Digg), Blogs(WordPress, Joomla), e-commerce websites(Open Cart, Magnetos etc.) etc. • Command Line Scripting. You can write PHP scripts to perform different operations on any machine, all you need is a PHP parser for this. • Sending Emails or building email applications because PHP provides with a robust email sending function. • WordPress is one of the most used blogging(CMS) platform in the World, and if you know PHP, you can try a hand in WordPress plugin development.

Editor's Notes

  1. Who is the Client here? The one who access Who is the browser here? The Client.
  2. What is HTTP Server? URL Defines 4 Parts HTTP Is an application layer protocol that is used to virtually transmit files and other data.
  3. MIME – Multipurpose Internet Mail Extension