From:http://jingyan.baidu.com/article/ca41422fd8cf3d1eae99ed3e.html
Because you want to use Phpdocument to generate the document, you have to install the pear extension, and the online tutorial is unclear, so write a detailed tutorial for your reference
Method/Step
Check if Go-pear.bat or Go-pear.phar file exists
Check the PHP installation directory go-pear.bat or Go-pear.phar file exists, if not exist, to the official website to download, here can not put the link to the official website, you go to search it.
Execute the Pear installation command
Open the Command window, switch to the PHP installation directory, execute the following command (you can also add a PHP environment variable, it is not so troublesome to switch directories, but I installed multiple versions of PHP, so there is no environment variable added).
PHP Go-pear.phar
Installing Pear
When the following sentence appears, you can directly press ENTER, if the last error, reinstall, here you can enter the local, I do not know why, because encountered a direct return, to the end but the installation is unsuccessful.
Is you installing a system-wide PEAR or a local copy?
(system|local) [System]:
Configuring the Pear Directory
Here you can enter the corresponding data and change the directory location of the pear. Words there is no good change, not very familiar with, or directly enter the insurance point.
Change the php.ini configuration file
Tip We want to change php.ini, of course, enter Y,
Determine the Pear directory
Direct return
Register the EVN variable,
The correct directory for the Pear_env.reg file shown in the figure should be D:\phpStudy\php52\PEAR_ENV.reg, and I don't know why a slash is missing.
Find this file and double-click on him.
Check if pear is installed
Use pear directly, if the use of Pear command indicates that the installation is successful
steps to read
[Go]pear Windows installation