Some PEAR Packages in Action

In this section, we will work with a number of PEAR packages, starting with the Auth package we have already installed. We will also look at a package for documenting your code and a package for working with configuration files.

The Auth Package

Auth is an object-oriented package designed to help you add password protection to your projects. Adding users, avoiding duplicate usernames, logging users in, and authenticating users after they are logged in are all tasks the Web programmer encounters repeatedly. Auth handles the donkey work, leaving you free to concentrate on your project’s logic.

In this section we will look at the Auth class and its methods. We will also use Auth with some procedural code to build a ...

Get Sams Teach Yourself PHP in 24 Hours, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.