[main] [misc] [graphics] [page design] [site design] [xhtml] [css] [xml] [xsl] [schema] [javascript] [php] [mysql]

HVCC Home
Blackboard HVCC
Blackboard Manual
Faculty Association

php main
1. what is php
a. php history
* b. uses of php
c. php hello world
d. installing php
2. http basics
3. php basics
4. php expressions
5. php client side
6. php flow control
7. php manual


print version

Note that all external links will open up in a separate window.

This is a stripped down version of these pages for older browsers. These pages are really meant to be viewed in a standards compliant browser.

Directions for surfing with audio.

Uses of PHP

These tutorials are about PHP and its use for server-side Web programming.

What Can PHP Do?

PHP is a server-side scripting language whose primary purpose is to generate HTML content. Its creator, Rasmus Lerdorf defines it as "a cross-platform, HTML-embedded, server-side web scripting language" [Lerdorf 2002, p.1]. With the current direction of the Web, it is easily being adapted to writing out all forms of XML content as well. The most recent version of PHP is PHP 4.

Personal Homepage (PHP): a cross-platform, HTML-embedded, server-side web scripting language

It was originally developed as a set of server-side modules to perform some specific Web-server tasks on small, Unix-based Web servers. Since then PHP has grown beyond the work of one man writing some tools for his own use and into one of the most popular server-side scripting languages in the Web.

Three thing make PHP popular. The first is that it is easy: easy to implement, easy to learn, and easy to use. The second is that it is free. The third is that it runs on almost any Web server on almost any platform currently available.

PHP is both a scripting language and a collection of tools for performing various server-side functions in an HTTP, or Web, server. Since it is written as a collection of C-modules, it can go beyond server-side scripting and can also be used to execute scripts from the command line and for developing client-side GUI applications that can operate on most any platform.

The core features of PHP are built around the ability to process strings and arrays, as well as to work as an object-oriented programming language. Beyond this most of PHP is a collection of modules that can be added in on the server as needed to perform a large variety of specific tasks. In other words, it is a highly customizable application, and you can keept it small by only installing as much as you need to perform required tasks.

Database Access

One of set modules control database access. Using PHP with MySQL has become common enough that the MySQL interface is now part of core PHP instead of a plug-in module. Most other databases have modules that can be included in a PHP build to allow access. PHP can access most any SQL or ODBC database. It can both read and write information in the database.

This opens up the door for a whole variety of online business applications that require data storage on the server. Because of this, PHP is becoming an increasingly popular tool for e-commerce.

File Access

PHP can read and write files. It can also do basic file and directory maintenance. Because of this, you can use it to do such things as edit documents remotely. It can also be used to search flat file collections for the existence of a given file or for the existence of information stored in files and return the results. Information does not need to be coded into a database just to be accessible.

It can also take content and use it to generate files in various formats, including HTML and PDF. It is an incrasingly popular tool for processing XML for HTTP distribution. It can also take data and use it to generate e-mail, which is can send out through most any standard mail protocol.

Its ability to work across multiple data sources and return multiple content types makes it an ideal tool for things like search engines and message boards.

Application Control

PHP started as an application control language. Specifically, it was designed to handle access logging for HTTP servers. This ability has expanded greatly and now PHP can even be used as a scripting language in such applications as Microsoft Word and Excel.

Graphics

PHP can not only manage text content, it can also manage graphic content. It can be used to create graphs and charts. It can be used to generate GIF and PNG images on the fly, allowing you, for instance, to have a button template that has the text added to it dynamically before being sent to the client. This means you don't need a new image for each button, just one image that has the text added as needed for each individual button.

Extensible

PHP is extensible. It is written in C and the underlying source can be expanded on with new modules written in the same. It is also open source, so engaging in such expansion is permitted and encouraged.

[top]