0% found this document useful (0 votes)
2 views

1 PHP Programming Intro (1)

This document provides an introduction to PHP, a widely used server-side scripting language for web development, highlighting its features, installation requirements, and applications. It compares PHP with other web development tools like Perl, CGI, ASP, JSP, and Servlets, emphasizing its simplicity, speed, and open-source nature. Additionally, it outlines prerequisites for learning PHP and mentions the use of XAMPP for setting up a PHP development environment.

Uploaded by

scuyno439
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

1 PHP Programming Intro (1)

This document provides an introduction to PHP, a widely used server-side scripting language for web development, highlighting its features, installation requirements, and applications. It compares PHP with other web development tools like Perl, CGI, ASP, JSP, and Servlets, emphasizing its simplicity, speed, and open-source nature. Additionally, it outlines prerequisites for learning PHP and mentions the use of XAMPP for setting up a PHP development environment.

Uploaded by

scuyno439
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

PHP

Programming
Introduction
At the end of this lesson…

Students will be able to…


• Define PHP language
• Discuss the importance of PHP
• Differentiate PHP with other web development
tools
• Demonstrate the steps to install PHP IDE and
XAMPP
Introduction

PHP is one of the most widely used server side


scripting language for web development. Popular
websites like Facebook, Yahoo, Wikipedia etc., are
developed using PHP.

PHP is so popular because it's very simple to learn,


code and deploy on server, hence it has been the first
choice for beginners since decades.
Introduction

What is PHP?

PHP stands for Hypertext Pre-Processor. 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.
Introduction

PHP Pre-requisites

Before learning this course you must have a knowledge and


skills on the following:
1. HTML
2. CSS
3. Little bit of Javascript
Introduction

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 (OpenCart, Magento 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.
Create Facebook applications and easily integrate Facebook plugins in your
website, using Facebook's PHP SDK.
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.
Introduction

Is PHP the right language?


Features:
• open source and free
• very simple and easy to understand syntax
• PHP is cross platform
• popular web hosting services support PHP.
• Popular Content Management Systems like Joomla, Drupal etc. are
developed in PHP
• fast
• in-built support for MySQL
Introduction

Requirements for PHP


To run PHP scripts, we need the following services:

• PHP Parser
• Web Server
• Database
Introduction

What is XAMPP?
XAMPP stands for:

X: Cross Platform, as it supports all the modern operating systems


like
Windows, Mac OSX, Linux etc.
A: Apache Web Server
M: MySQL database management system (MariaDB).
P: PHP installation
P: Perl scripting language
Introduction

The installation process is simple and once installed you will see a small
window like this, showing the status of various services which are
running.

You can easily control, stop and restart, various services using the XAMPP Control Panel.
Upon successful installation, a folder with name xampp will be created in the C drive(by
default). In the folder xampp there are many sub-folders like apache, cgi-bin,
FileZillaFTP etc., but the most important sub-folders are:
Introduction

htdocs: This is the folder in which we will keep all our PHP files.
mysql: This folder contains all the files for the MySQL database.
By default the MySQL database runs on port number 3306.
php: This folder holds all the installation files for PHP. All the
configurations for the current PHP installation is saved in php.ini
file which is stored in this folder.
If everything seems fine and the apache server is
running(check in the XAMPP control panel), open your Web
browser and enter localhost in the address bar and hit enter.
You will see the default page of Apache web server.
Introduction

Other Software Packages

XAMPP is not the only available package, although it is the


most widely used one. Here are a few other Operating
System specific options that you can download and install:
WAMP: It's for Windows (Window, Apache, MySQL and
PHP)
MAMP: It's for Mac OSX (Macintosh, Apache, MySQL and
PHP)
LAMP: It's for Linux (Linux, Apache, MySQL and PHP)
Introduction

IDE or Editor for writing PHP


code
• Before we checkout the list of IDEs and Editors, we must know the
difference between both. An Editor is a simple text editor with
enhanced capabilities like syntax highlighting etc., many modern editors
also allows for language specific plugin download to support more
features.
• Whereas, an IDE is an integrated development environment, which is a
self-contained package that allow you to write, compile, execute and
debug code in the same place.
• So if you want a light weight software, go for any Editor, and if you want
a heavy weight IDE, you can choose any one from the list below.
Introduction

So here are a few good IDEs and Editors:


Netbeans IDE
Eclipse IDE
PyStorm IDE
Atom Editor
Brackets Editor
Notepad ++
Sublime Text
Introduction

Comparison with dynamic content alternatives

PHP vs. Perl


PHP solves a very specific problem: building Web sites and
Web applications. Perl was designed as a general purpose
programming language.
Introduction

Comparison with dynamic content alternatives


PHP vs. CGI
PHP is a programming language which offers great flexibility. CGI, on the other hand, is
not a programming language but rather an interface to the system which allows for an
interface that comes to the system using a script or executable file of which may be C,
C++, Perl, and similar languages.
CGI programs is language independent, Where PHP is not language independent as it
is itself a language.
CGI programs are very slow, because they need to work a new process for every HTTP request
and the database connection. Whereas PHP is faster and easy to learn.
CGI is costly whereas PHP development is not costly as CGI.
Introduction

Comparison with dynamic content alternatives


PHP vs. Active Server Pages (ASP)

• PHP is a programming language whereas ASP.NET is a programming framework.


• Websites developed byASP.NET may use C#, but also other languages such as J#.
• ASP.NET is compiled whereas PHP is interpreted. ...
• ASP.NET is designed for windows machines, whereas PHP is platform free (and typically runs
on Linux servers).
Introduction

Comparison with dynamic content alternatives


PHP vs. Java Server Pages (JSP)

Both the PHP and JSP are server-side scripting languages. Both the languages involve HTML
source code in order to create web pages. The best part is that they both are of free of cost
and support Unicode encoding. PHP is abbreviated as Hypertext processor whereas JSP is
abbreviated as java server pages. PHP and JSP were developed by PHP Group and SUN
Microsystems respectively. PHP is a scripting language that is widely used in the area of
Web development. It lets the web developers to rapidly jot down dynamically generated
pages. On the other hand, JSP is Java Server Pages. It is a technical modernization from JAVA
that allows designers and web developers to build up and keep up, dynamic Web pages that
are prosperous in information which in turn, empower systems.
Introduction

Comparison with dynamic content alternatives


Servlets

Java servlet is a part of java language that allows you to handle http
requests, it is similar to php which is a scripting language for web
applications. they both serve same purpose ie. serving web pages
and both require a server container to work… like apache.
THANK YOU!

You might also like