Php 4 Developer's Guide

( 2 )

Overview

*PHP—a server-side,embedded HTML scripting language—is used to develop dynamic Web content.
* Hot language—Red Hat and Mitsubishi are among the companies that use PHP as their Web development solution. It's also the most popular Apache module.
* This book provides the tools and information needed to build dynamic Web applications and databases with PHP 4.
* Covers installation,configuration,database ...
See more details below
Paperback
$56.05
BN.com price
(Save 15%)$65.95 List Price
Other sellers (Paperback)
  • All (18) from $1.99   
  • New (7) from $1.99   
  • Used (11) from $1.99   
Sending request ...

Overview

*PHP—a server-side,embedded HTML scripting language—is used to develop dynamic Web content.
* Hot language—Red Hat and Mitsubishi are among the companies that use PHP as their Web development solution. It's also the most popular Apache module.
* This book provides the tools and information needed to build dynamic Web applications and databases with PHP 4.
* Covers installation,configuration,database connectivity,working with XML and CGL,and much more.
* Includes details on the new features in PHP 4,including shared memory support,the new Zend engine,and XML support.

A Complete Resource for Developing Applications with PHP4

Build dynamic database-enabled Web applications with PHP4 using this comprehensive sourcebook. You'll learn to take advantage of all of the new enhancements—including sessions,a faster interpreter,and enhanced Java and XML support—that make this easy-to-learn language ideal for developing Web applications. Filled with real-world examples that show how to build both template-based and database-driven sites,this book contains all the essential tools and information for creating rich Web content. Covering everything from installation and configuration to interaction with existing codebases,this book offers complete guidance for today's professional developer.

You'll find everything you need to:

  • Master all of the new features of PHP4
  • Process and validate forms
  • Separate HTML from PHP4 code
  • Debug and re-use code
  • Work with templates and databases
  • Generate static HTML pages from dynamic data

For clear,detailed information on working with PHP4—including coverage of itslatest features—no other book can offer the same depth and breadth of coverage as this invaluable guide.

Special features include:

  • PHP4 language overview
  • Coverage of installation and configuration
  • Debugging tips and techniques
  • Appendices containing function lists,build options,and Internet resources
  • Hundreds of real-world examples for creating dynamic Web sites
Read More Show Less

Product Details

  • ISBN-13: 9780072127317
  • Publisher: McGraw-Hill Companies, The
  • Publication date: 1/1/2001
  • Series: Application Development Series
  • Pages: 800
  • Product dimensions: 1.56 (w) x 7.50 (h) x 9.25 (d)

Read an Excerpt

Chapter 1: Building and Installing PHP4

Introduction

Before delving into the language, it is important to first get PHP installed and running in your environment. Because PHP supports so many Web servers and operating systems, this chapter focuses on providing detailed examples of installing on only a few platforms, while providing enough information so that you can tweak the examples to your specific platform.

The platforms that are discussed in depth in this chapter are Apache on Linux and IIS/PWS on Windows NT. These are common Web server configurations and are different enough to illustrate the required concepts for installing PHP on most platforms. Platform-specific details can also be found at the PHP site, wwwphp.net.

Downloading PHP

Obviously, the first step in beginning with PHP is to download it. The download section at www.php.net provides several download options. The most current version of PHP is listed at the top of the downloads page. For a *nix server, it is recommended that you download the complete source code and build PHP yourself. The term *nix refers to any Unix-like platform, including Linux, BSD, Solaris, and others. For Windows, it is recommended that you download the binary version of PHP.

From the download page, you can also download a previous version of PHP, the documentation, and related PHP tools. You may want to download a previous version of PHP if you already have PHP code running elsewhere and don't want to risk incompatibilities.

Installing the Binary Version

Once you have obtained a binary distribution of PHP, installation is straightforward. The most common binary installation of PHP is theWindows version. Because some *nix distributions may include a binary distribution of PHP, a brief installation discussion is included here as well.

Windows Binary Installation

With PHP, more than one option is always available for just about everything. The binary PHP download for Windows includes both the Common Gateway Interface (CGI) version of PHP and the ISAPI version. If you are running the Internet Information Server (IIS) or the Personal Web Server (PWS), it is recommended that you use the ISAPI version of PHP. The CGI version requires that the PHP executable be invoked for each page, so it is less efficient than using a dynamically linked library such as an ISAPI extension. The ISAPI version is also inherently more secure than the CGI version, so it is preferred.

Installing the PHP ISAPI Module If you are using IIS/PWS or another Windows-based Web server that supports ISAPI, then the best choice for security and scalability is to use the PHP ISAPI module. To install the ISAPI module, copy the php4ts.d11 and msvcrt.dll files into the Windows system directory (usually \ windows \ system on Windows 95 and \winnt\system32 on Windows NT). These files must be copied to the system directory for any version of PHP4 to work on Windows. They are shared libraries that must be available for PHP to work correctly. Additionally, you may copy the other DLL files to the system directory if you want, but they do not need to be moved to be used.

Next, IIS or PWS needs to be configured to use the ISAPI module when serving PHP files. This is done by starting the Microsoft Management Console for IIS configuration, which is typically available from the Windows NT Option Pack menu. Figure 1.1 shows the menu hierarchy for locating the application on Windows NT Once the Microsoft Management Console is running, right-click on your Web server node (probably labeled Default Web Site) and select Properties, as shown in Figure 1.2. Then on the Properties dialog, select the Home Directory tab and click the Configuration button. This enables you to add and edit extension mappings. Click the Add button and then enter the information requested. Figure 1.3 shows the process of adding the PHP ISAPI module as a mapping for files with the phtml extension.

Once you have added a mapping, the information appears in the Application Configuration dialog. Something that might be useful for testing is to have some extensions map to the PHP ISAPI module and some to the CGI executable...

Read More Show Less

Table of Contents

Chapter 1: Building and Installing PHP4.
Chapter 2: The Language.
Chapter 3: Forms and Cookies.
Chapter 4: Working with Files.
Chapter 5: Forms and File Uploading.
Chapter 6: Working with Databases.
Chapter 7: Sessions and Application State.
Chapter 8: Authentication.
Chapter 9: Browser Independence.
Chapter 10: Debugging.
Chapter 11: Code Reuse.
Chapter 12: Separating HTML from PHP.
Chapter 13: Cool PHP.
Chapter 14: Template-Based Web Site.
Chapter 15: Database-Driven Web Site.
Chapter 16: Generating Static HTML Pages from Dynamic Data.
Chapter 17: E-Commerce Web Sites.
Read More Show Less

Customer Reviews

Average Rating 4.5
( 2 )
Rating Distribution

5 Star

(1)

4 Star

(1)

3 Star

(0)

2 Star

(0)

1 Star

(0)
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted Mon Jan 06 00:00:00 EST 2003

    Good book

    This is a good book, I think is worth the money if you want to learn php. The examples are clear and easy to understand, I'm not a php expert but this book sure is a good investment.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted Sun Nov 26 00:00:00 EST 2000

    the best of the best

    well.. i think this book depicts chinese lifestyle VERY well and i enjoyed it thuroughly. perhaps now people will think twice about buying that next pair ok NIKE's

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)