Flexible Open Source Tools
Find out how to script in PHP, an open-source embedded scripting language for HTML. You'll learn how to install and configure PHP for use with the Apache Web server on UNIX or the Microsoft Internet Information Server on Windows NT. Then you'll see by example how to use PHP to route HTML conditionally, to develop a simple database-driven Web application, and to track user sessions with cookies.
Like Microsoft's Active Server Pages (ASP), PHP is a server-side scripting language for building Web sites. With strong tools for working with more than ten commercial and noncommercial databases, PHP may be the ideal tool if you often rely on databases in your Web development -- and especially if you develop for both NT and for UNIX. If you're ready to try such a flexible open-source tool, read on for details about scripting with PHP.
What is PHP?
PHP is an HTML-embedded scripting language for Windows and UNIX designed to help Web developers write dynamically generated pages quickly. Much of its syntax is borrowed from C, Java, and Perl, so developers familiar with those should feel comfortable with PHP right away.
One of PHP's greatest strengths is its easy interface to a wide variety of databases. Current database modules include:
- Microsoft SQL Server
Additionally, a large set of optional components (some of which require installing an external library) provide support for:
- Accessing LDAP servers
- Accessing IMAP mail servers
- Sending SMTP mail
- Accessing SNMP
- Generating PDF documents dynamically
- Generating GIF images dynamically
- Parsing XML documents
- Checking the spelling of words
- Generating WDDX (Web Distributed Data Exchange) data
A short history of PHP
Rasmus Lerdorf originally wrote PHP to manage his home page, hence the name, an acronym for personal home pages. The product quickly gained a following, and later a group of developers rewrote it as PHP 3. PHP development continues today with a core team of developers that include Lerdorf, Andi Gutmans, Zeev Suraski, Stig Bakken, Shane Caraveo, and Jim Winstead.