[go: up one dir, main page]

0% found this document useful (0 votes)
14 views3 pages

4 T 5

PHP, created by Rasmus Lerdorf in 1994, is a server-side scripting language used for managing dynamic content and databases, and is integrated with various popular databases. It is characterized by its simplicity, efficiency, security, flexibility, and familiarity, making it a popular choice for web development. The document also outlines the installation requirements for PHP, including a web server, database, and PHP parser, and provides a basic example of a PHP script.

Uploaded by

fuaddacad85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

4 T 5

PHP, created by Rasmus Lerdorf in 1994, is a server-side scripting language used for managing dynamic content and databases, and is integrated with various popular databases. It is characterized by its simplicity, efficiency, security, flexibility, and familiarity, making it a popular choice for web development. The document also outlines the installation requirements for PHP, including a web server, database, and PHP parser, and provides a basic example of a PHP script.

Uploaded by

fuaddacad85
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

PHP started out as a small open source project that evolved as more and more people

found
out how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back
in 1994.
 PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
 PHP is a server side scripting language that is embedded in HTML. It is used to
manage
dynamic content, databases, session tracking, even build entire e-commerce sites.
 It is integrated with a number of popular databases, including MySQL, PostgreSQL,
Oracle, Sybase, Informix, and Microsoft SQL Server.
 PHP is pleasingly zippy in its execution, especially when compiled as an Apache
module
on the Unix side. The MySQL server, once started, executes even very complex
queries
with huge result sets in record-setting time.
 PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making
n-tier development a possibility for the first time.
 PHP is forgiving: PHP language tries to be as forgiving as possible.
 PHP Syntax is C-Like.
Common Uses of PHP
PHP performs system functions, i.e. from files on a system it can create, open,
read, write,
and close them. The other uses of PHP are:
 PHP can handle forms, i.e. gather data from files, save data to a file, thru
email you
can send data, return data to the user.
 You add, delete, modify elements within your database thru PHP.
 Access cookies variables and set cookies.
 Using PHP, you can restrict users to access some pages of your website.
 It can encrypt data.

PHP ─ INTRODUCTION
PHP
9
Characteristics of PHP
Five important characteristics make PHP's practical nature possible:
 Simplicity
 Efficiency
 Security
 Flexibility
 Familiarity
"Hello World" Script in PHP
To get a feel of PHP, first start with simple PHP scripts. Since "Hello, World!" is
an essential
example, first we will create a friendly little "Hello, World!" script.
As mentioned earlier, PHP is embedded in HTML. That means that in amongst your
normal
HTML (or XHTML if you're cutting-edge) you'll have PHP statements like this:
<html>
<head>
<title>Hello World</title>
<body>
<?php echo "Hello, World!";?>
</body>
</html>
It will produce the following result:
Hello, World!
If you examine the HTML output of the above example, you'll notice that the PHP
code is not
present in the file sent from the server to your Web browser. All of the PHP
present in the
Web page is processed and stripped from the page; the only thing returned to the
client from
the Web server is pure HTML output.
All PHP code must be included inside one of the three special markup tags ate are
recognized
by the PHP Parser.
<?php PHP code goes here ?>
<? PHP code goes here ?>
<script language="php"> PHP code goes here </script>
Most common tag is the <?php...?> and we will also use the same tag in our
tutorial.
PHP
10
From the next chapter, we will start with PHP Environment Setup on your machine and
then
we will dig out almost all concepts related to PHP to make you comfortable with the
PHP
language.
PHP
11
In order to develop and run PHP Web pages, three vital components need to be
installed on
your computer system.
Web Server - PHP will work with virtually all Web Server software, including
Microsoft's
Internet Information Server (IIS) but then most often used is freely available
Apache Server.
Download Apache for free here: http://httpd.apache.org/download.cgi
Database - PHP will work with virtually all database software, including Oracle and
Sybase
but most commonly used is freely available MySQL database. Download MySQL for free
here:
http://www.mysql.com/downloads/index.html
PHP Parser - In order to process PHP script instructions, a parser must be
installed to
generate HTML output that can be sent to the Web Browser. This tutorial will guide
you how
to install PHP parser on your computer.
PHP ParserInstallation
Before you proceed, it is important to make sure that you have a proper environment
setup
on your machine to develop your web programs using PHP.
Type the following address into your browser's address box.
http://127.0.0.1/info.php
If this displays a page showing your PHP installation related information, then it
means you
have PHP and Webserver installed properly. Otherwise you have to follow given
procedure to
install PHP on your computer.
This section will guide you to install and configure PHP over the following four
platforms:
 PHP Installation on Linux or Unix with Apache
 PHP Installation on Mac OS X with Apache
 PHP Installation on Windows NT/2000/XP with IIS
 PHP Installation on Windows NT/2000/XP with Apache
PHP Installation on Linux or Unix with Apache
If you plan to install PHP on Linux or any other variant of Unix, then here is the
list of
prerequisites:

You might also like