With the Pear Package Manager, you can browse and search for the packages you've contributed, view the latest releases, and download the packages. The syntax for executing it on the command line is as follows:%>pear [options] command [command-options]
Open a command-line prompt, execute%>pear, and output a set of common commands and some usage information.
%>pear Help can query the use of a command.
1. View the installed PEAR package
%>pear List
2. Learn more about the installed PEAR pack
%>pear Info Package Name
3. Install PEAR Package
Syntax:%>pear install [options] Package
Suppose, for example, that you want to install a Auth package:%>pear Install Auth
From the execution output of the command, you can see that many packages have optional dependency packages, and if they are installed, some of the available features can be extended.
3.1, automatic installation of all dependent
Any required dependencies will be installed by default after the pear version. However, you may also want to install optional dependencies. This time, pass-A is the--alldeps option:
%>pear install-a Auth_http
3.2. Manually install a package from PEAR Web Site
The Pear Package Manager installs the latest stable version of the package by default. But if you want to install a previous version of the package, or you can't use the Package Manager at all (because there are some administrative restrictions on the shared server), you can go to pear.php.net and find the package you need. If you know the package name, add the package name directly behind the URL just now, so that's a shortcut. These packages are formatted as tgz.
Then, extract the downloaded tgz format file to the appropriate location. Creating a pear directory in the home directory is sufficient if you are forced to follow the installation process by bypassing the ISP restrictions. In any case, make sure that the directory is in Include_path.
4. Include the package into the script
Using the pear package is simple, just use include or require to make the contents of the package available to the script. Remember that you need to add the base directory of the pear to the include_path directive.
Require_once ("numbers/roman.php")
The above describes the use of the Pear Package Manager, including aspects of the content, I hope that the PHP tutorial interested in a friend helpful.