This article mainly shares with you the basic usage of pear in php, mainly in the form of text and code. I hope it can help everyone.
pear is an official open source class library of PHP. It is powerful and convenient. Many people don’t know where to start using PEAR. If you search on the Internet, most of them are go-pear.php installation and so on.
Simple Note: In versions before PHP 4.4, you need to use go-pear.php. Pear after that has been installed by default, but you can use the go-pear.phar file to upgrade pear.
1. From http:/ /pear.php.net/go-pear.php Copy and download go-pear.php or go-pear.phar, save it to the php directory
2.cmd method to enter the php directory, run php go- pear.phar
3. If there is any problem, solve it according to the relevant prompts
Usage of pear
1.cmd mode to enter the php directory
2. Execute pear and check whether the command can be used
3.pear list displays the installed packages
4. pear install ** Install new packages **
5 .Example: pear install html_quickform (install quick form), after the installation is completed, you can find html/quickform
6 in the pear directory. In the source code, quote the class file in the corresponding directory for use.
Related recommendations:
The above is the detailed content of Share the basic usage of pear in php. For more information, please follow other related articles on the PHP Chinese website!