php.net/ and locate the
desired package. If you know the package name, you can take a shortcut by entering
the package name at the conclusion of the URL: http://pear.php.net/package/.
Next, click the Download tab found toward the top of the package??™s home page. Doing
so produces a linked list of the current package and all previous packages released.
Select and download the appropriate package to your server. These packages are
stored in TGZ (tar and Gzip) format.
Next, extract the files to an appropriate location. It doesn??™t really matter where,
although in most cases you should be consistent and place all packages in the same
tree. If you??™re taking this installation route because of the need to install a previous
version, it makes sense to place the files in their appropriate location within the PEAR
directory structure found in the PHP root installation directory. If you??™re forced to
take this route in order to circumvent ISP restrictions, creating a PEAR directory in
your home directory will suffice. Regardless, be sure this directory is in the include_path.
The package should now be ready for use, so move on to the next section to learn
how this is accomplished.
320 CHAPTER 11 ?– PEAR
Including a Package Within Your Scripts
Using an installed PEAR package is simple. All you need to do is make the package
contents available to your script with include or preferably require.
Pages:
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396