Define PHP
• PHP is a server-side scripting language for
creating dynamic Web pages. You create pages with PHP
and HTML.
• Much of its syntax is borrowed from C, Java and
Perl
with a couple of unique PHP-specific features
thrown in.
• Can also be used to create dynamic web pages
that are generated from information accessed from a
MySQL database.
3
Example of PHP
<?php
$Cat = “Spot”;
$Dog = “Clif”;
Print ”My cat” .$Cat. “and my dog. “like to play
together.”;
?>
4
List the PHP system requirements
1.
MYSQL
2.
APACHE
3.
FILEZILLA
4.
MERCURY
5.
TOMCAT
5
The Function Of PHP
Interactive Features
PHP allows you to interact with your visitors in ways HTML
alone can’t. This can mean simple things like e-mail forms,
or more elaborate things like shopping carts that save your
past orders and recommend similar products. It can also
mean social things like interactive forums and private
messaging systems
Connect With Database
6
Differentiate between PHP and HTML
PHP
HTML
1. Scripting language
1. Markup language
2. Server-side scripting
2. Client-side scripting languange
3. Extension file.php
3. Extension file.html
4. Code execute in web server
4. Code execute at Web browser
5. Creating dynamic web pages
5. Creating static web pages
6. Can manipulate data
6. Cannot manipulate data
7
The PHP Environment
•PHP environment variables allow your scripts to glean certain
types of data dynamically from the server.
•This supports script flexibility in a potentially changing server
environment.
A development environment allows you to test your code as you
develop your web application before publishing it to the web
9
Configure PHP In Windows Environment
Shows you two ways of configuring your PHP development
environment on the Windows operating system. The first and
most convenient way is to install and configure an AMP
(Apache, MySQL, PHP) package. Shows you how to install
the XAMPP package. The second way is to install and
configure each component separately.
10
Verify PHP In Web Server
•
It is one of the first developed server-side scripting
languages to be embedded into an HTML source document
rather than calling an external file to process data. The code
is interpreted by a Web server with a PHP processor module
which generates the resulting Web page.
•
It also has evolved to include a command-line interface
capability and can be used in standalone graphical
applications.
PHP can be deployed on most Web servers and also as a
standalone shell on almost every operating system and
platform free of charge.
11
Test PHP Installation
1. Double-click on the file that we downloaded in order to run it.
2. Select destination folder
3. Click Install
4.Progress Install
12