注意 Prior to working through the rest of this chapter, you should retrieve clean, unmodified source trees of your favorite Web server. We're working with Apache (available at http://www.apache.org/) and, of course, with PHP (available at http://www.php.net/ - does it need to be said?). Make sure that you can compile a working PHP environment by yourself! We won't go into this issue here, however, as you should already have this most basic ability when studying this chapter. Before we start discussing code issues, you should familiarize yourself with the source tree to be able to quickly navigate through PHP's files. This is a must-have ability to implement and debug extensions. The following table describes the contents of the major directories. Discussing all the files included in the PHP package is beyond the scope of this chapter. However, you should take a close look at the following files: php4/main/php.h, located in the main PHP directory. This file contains most of PHP's macro and API definitions. php4/Zend/zend.h, located in the main Zend directory. This file contains most of Zend's macros and definitions. php4/Zend/zend_API.h, also located in the Zend directory, which defines Zend's API. Zend is built using certain conventions; to avoid breaking its standards, you should follow the rules described in the following sections.