Chapter 2 Configuring Your Environment
Installing Apache and PHP on Linux
Installing Apache and PHP on Windows
Installing IIS and PHP on Windows
Configuring FastCGI to Manage PHP Processes
Configuring PHP at Build Time on Linux
Managing PHP's Configuration Directives
PHP's Configuration Directives
Choosing a Web Hosting Provider
Seven Questions for Any Prospective Hosting Provider
Embedding PHP Code in Your Web Pages
Embedding Multiple Code Blocks
Outputting Data to the Browser
Converting Between Datatypes Using Type Casting
Adapting Datatypes with Type Juggling
Passing Arguments by Reference
Returning Values from a Function
Populating Arrays with a Predefined Value Range
Adding and Removing Array Elements
Adding a Value to the Front of an Array
Adding a Value onto the End of an Array
Removing a Value from the Front of an Array
Removing a Value from the End of an Array
Retrieving the Current Array Key
Retrieving the Current Array Value
Retrieving the Current Array Key and Value
Passing Array Values to a Function
Determining Array Size and Uniqueness
Determining the Size of an Array
Counting Array Value Frequency
Determining Unique Array Values
Flipping Array Keys and Values
Merging, Slicing, Splicing, and Dissecting Arrays
Calculating an Array Intersection
Calculating Associative Array Intersections
Calculating Associative Array Differences
Returning a Random Set of Keys
Chapter 7 Advanced OOP Features
Advanced OOP Features Not Supported by PHP
Implementing a Single Interface
Implementing Multiple Interfaces
Chapter 8 Error and Exception Handling
Why Exception Handling Is Handy
PHP's Exception-Handling Implementation
Chapter 9 Strings and Regular Expressions
Regular Expression Syntax (POSIX)
PHP's Regular Expression Functions (POSIX Extended)
Regular Expression Syntax (Perl)
Other String-Specific Functions
Determining the Length of a String
Converting Strings to and from HTML
Alternatives for Regular Expression Functions
Padding and Stripping a String
Taking Advantage of PEAR: Validate_US
Chapter 10 Working with the File and Operating System
Learning About Files and Directories
Calculating File, Directory, and Disk Sizes
Determining Access and Modification Times
Recognizing Newline Characters
Recognizing the End-of-File Character
System-Level Program Execution
PHP's Program Execution Functions
The Power of PEAR: Converting Numeral Formats
Using the PEAR Package Manager
Viewing an Installed PEAR Package
Learning More About an Installed PEAR Package
Including a Package Within Your Scripts
Converting a Timestamp to User-Friendly Values
Displaying the Localized Date and Time
Displaying the Web Page's Most Recent Modification Date
Determining the Number of Days in the Current Month
Determining the Number of Days in Any Given Month
Calculating the Date X Days from the Present Date
Taking Advantage of PEAR: Creating a Calendar
Date and Time Enhancements for PHP 5.1+ Users
Introducing the DateTime Constructor
Setting the Date After Instantiation
Setting the Time After Instantiation
Passing Form Data to a Function
Working with Multivalued Form Components
Taking Advantage of PEAR: HTML_QuickForm
Chapter 14 Authenticating Your Users
PHP Authentication Methodologies
Taking Advantage of PEAR: Auth_HTTP
Testing Password Guessability with the CrackLib Library
One-Time URLs and Password Recovery
Chapter 15 Handling File Uploads
PHP's File Upload/Resource Directives
Taking Advantage of PEAR: HTTP_Upload
Learning More About an Uploaded File
Establishing Socket Connections
Sending E-mail Using a PHP Script
Working with the Distinguished Name
Managing the Session Storage Media
Setting the Session Files Path
Automatically Enabling Sessions
Choosing Cookies or URL Rewriting
Setting the Session Cookie Lifetime
Setting the Session Cookie's Valid URL Path
Setting Caching Directions for Session-Enabled Pages
Setting and Retrieving the Session ID
Creating and Deleting Session Variables
Encoding and Decoding Session Data
Practical Session-Handling Examples
Automatically Logging In Returning Users
Generating a Recently Viewed Document Index
Creating Custom Session Handlers
Tying Custom Session Functions into PHP's Logic
Using Custom MySQL-Based Session Handlers
Chapter 19 Templating with Smarty
Referencing Configuration Variables
Using CSS in Conjunction with Smarty
Working with the Cache Lifetime
Eliminating Processing Overhead with is_cached()
Creating Multiple Caches per Template
Some Final Words About Caching
Introducing PHP's SOAP Extension
Chapter 21 Secure PHP Programming
Other Security-Related Configuration Parameters
Denying Access to Certain File Extensions
Sanitizing User Input: The Solution
Taking Advantage of PEAR: Validate
Using the SQLite Command-Line Interface
Manipulating the Result Set Pointer
Retrieving a Table's Column Types
Creating and Overriding SQLite Functions
Chapter 23 Building Web Sites for the World
Translating Web Sites with Gettext
Step 1: Update the Web Site Scripts
Step 2: Create the Localization Repository
Step 3: Create the Translation Files
Step 6: Set the Desired Language Within Your Scripts
Localizing Dates, Numbers, and Times
Chapter 24 MVC and the Zend Framework
Introducing the Zend Framework
Downloading and Installing the Zend Framework
Creating Your First Zend Framework-Driven Web Site
Searching the Web with Zend_Service_Yahoo
A (Hyper) Active User Community
Chapter 26 Installing and Configuring MySQL
Installing and Configuring MySQL on Windows
Setting the MySQL Administrator Password
Controlling the Daemon Manually
Starting and Stopping MySQL Automatically
Configuring and Optimizing MySQL
MySQL's Configuration and Optimization Parameters
Configuring PHP to Work with MySQL
Chapter 27 The Many MySQL Clients
Introducing the Command-Line Clients
Chapter 28 MySQL Storage Engines and Datatypes
Working with Databases and Tables
The MySQL Access Privilege System
How the Privilege System Works
Where Is Access Information Stored?
Starting the SSL-Enabled MySQL Server
Connecting Using an SSL-Enabled Client
Storing SSL Options in the my.cnf File
Chapter 30 Using PHP with MySQL
Handling Installation Prerequisites
Enabling the mysqli Extension on Linux/Unix
Enabling the mysqli Extension on Windows
Setting Up and Tearing Down the Connection
Storing Connection Information in a Separate File
Securing Your Connection Information
Sending a Query to the Database
Determining the Rows Selected and Rows Affected
Working with Prepared Statements
Executing Database Transactions
Another Database Abstraction Layer?
Connecting to a Database Server and Selecting a Database
Getting and Setting Attributes
Introducing Prepared Statements
Should You Use Stored Routines?
How MySQL Implements Stored Routines
Stored Routine Privilege Tables
Declaring and Setting Variables
Creating and Using Multistatement Stored Routines
Calling a Routine from Within Another Routine
Viewing a Routine's Creation Syntax
Integrating Routines into Web Applications
Creating the Employee Bonus Interface
Before Triggers vs. After Triggers
Integrating Triggers into Web Applications
Incorporating Views into Web Applications
Chapter 35 Practical Database Queries
Creating Tabular Output with PEAR
Creating More Readable Row Output
Creating a Table from Database Data
Generalizing the Output Process
Querying Multiple Tables with Subqueries
Performing Comparisons with Subqueries
Determining Existence with Subqueries
Performing Database Maintenance with Subqueries
Iterating Result Sets with Cursors
Chapter 36 Indexes and Searching
MySQL's Transactional Capabilities
Creating Tables and Adding Sample Data
Executing an Example Transaction
Backing Up and Restoring InnoDB Tables
Building Transactional Applications with PHP
Chapter 38 Importing and Exporting Data
Importing Data with LOAD DATA INFILE
Importing Data with mysqlimport
3.144.255.87