Foundations of PEAR_ Rapid PHP Development.pdf

时间:2022-09-07 04:45:12
【文件属性】:

文件名称:Foundations of PEAR_ Rapid PHP Development.pdf

文件大小:9.62MB

文件格式:PDF

更新时间:2022-09-07 04:45:12

Foundations PEAR_ Rapid PHP Development

This first chapter of the book discusses how to install PEAR and how to use the PEAR package manager. It also discusses how to configure PEAR. If you’ve already been using the PEAR package manager and some PEAR packages, feel free to skip the first part of this chapter or lightly skim it for review. The second part of this chapter discusses PEAR_Error, a package that you’ll run into and use when you’re adding exception handling to your application using PEAR packages. Installing PEAR Fortunately, if you’re using PHP 5 in a Unix or Linux environment, the PEAR package manager is automatically installed as part of PHP—that is, unless you’ve specifically compiled PHP with the --without-pear option. If you compiled PHP one night at three in the morning while writing your own port of Scorched Earth in assembler in a different window, and can’t remember what configuration options you used, check the info.php file that’s mentioned in the “Prerequisites” section. As long as the PHP bin directory is part of your path, you can access the package manager in a Unix or Linux environment by typing pear at the command line. Installing the PEAR package manager on Windows requires a few more manual steps. First, you must have installed PHP from the ZIP package and not from the installer package (a Windows MSI). The Windows installer doesn’t include the go-pear.bat script referenced here to begin the installation of PEAR. After extracting the PHP from the ZIP archive, the first step is to execute the go-pear.bat file that’s located in the directory PHP is installed in. Once you have the PATH variable set correctly, you can access the package manager from the command line by typing pear. In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning. Code words in text are shown as follows: "We can include other contexts through the use of the include directive."


网友评论