15
TOPIC 1: TOPIC 1: INTRODUCTION TO INTRODUCTION TO PREPROCESSOR (PHP) PREPROCESSOR (PHP)

Chapter 1

  • Upload
    uma-sam

  • View
    766

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 1

TOPIC 1:TOPIC 1:INTRODUCTION TO INTRODUCTION TO PREPROCESSOR (PHP)PREPROCESSOR (PHP)

Page 2: Chapter 1

2

Hypertext Preprocessor (PHP) ConceptHypertext Preprocessor (PHP) Concept

Page 3: Chapter 1

3

Define PHPDefine 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.

Page 4: Chapter 1

4

Example of PHPExample of PHP

<?php$Cat = “Spot”;$Dog = “Clif”;Print ”My cat” .$Cat. “and my dog. “like to play

together.”;

?>

Page 5: Chapter 1

5

List the PHP system requirementsList the PHP system requirements

1. MYSQL

2. APACHE

3. FILEZILLA

4. MERCURY

5. TOMCAT

Page 6: Chapter 1

6

The Function Of PHPThe 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

Page 7: Chapter 1

7

Differentiate between PHP and HTMLDifferentiate 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

Page 8: Chapter 1

8

PHP EnvironmentPHP Environment

Page 9: Chapter 1

9

The PHP EnvironmentThe 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

Page 10: Chapter 1

10

Configure PHP In Windows EnvironmentConfigure 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.

Page 11: Chapter 1

11

Verify PHP In Web ServerVerify 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.

Page 12: Chapter 1

12

Test PHP InstallationTest PHP Installation

1. Double-click on the file that we downloaded in order to run it. 2. Select destination folder

3. Click Install4.Progress Install

Page 13: Chapter 1

13

5. Press Enter

6. Press enter

Page 14: Chapter 1

14

7. Type ‘y’ then press enter

8. XAMMP is ready to use. Close the window

Page 15: Chapter 1

15