PEAR tutorial (1) -- Pear introduction and installation

Source: Internet
Author: User
PEAR tutorial (1) -- Pear introduction and installation; read PEAR tutorial (1) -- Pear introduction and installation. please open this link first. PEARisshortfor "PHPExtensi

First, open this link at http://pear.php.net/manual/en/let's see that pear. is located in the east and west, and Click chapter 1. Introduction.

PEAR is short for "PHP Extension and Application Repository" andis pronounced just like the fruit. the purpose of PEAR is toprovide: Pear is The abbreviation of "PHP Extension and ApplicationRepository". its pronunciation is The same as that of The English word "Li", so you can see that this website is marked as a PEAR.

* A structured library of open-source code for PHP users open-source libraries that can be used by all php developers
* A system for code distribution and package maintenance is A code distribution packaging system.
* A standard style for code written in PHP, specifiedhere is A standard php code format
* The PHP Extension Community Library (PECL), see morebelow is a PECL Library
...
In a word, PEAR is a powerful php library, and my bloggermap is also used, and the package of this library is complete, including database, form generation, and cache, I will introduce it to you later.

Reader requirements: 1. WAMP (window + apache + mysql + php) server will be built. 2. simple php3. willing to use PEAR

The following describes how to install PEAR (which is important ):

First, let's talk about the include path of php. This is similar to the classpath of java. it has a default path, such as php. ini sets several default paths/etc/include OR/etc/DEMO. in php code, if there is a file similar to "include 'File. php ';' contains the statement. when the program is executed, it searches for the file in the current folder. php file. if not, search for the file in the/etc/include OR/etc/DEMO folder. if not, an error is returned!

For foreign virtual hosts, many have installed PEAR, and the installed PEAR package is complete, so you reference include "PEAR. php ", the program will be based on php. ini finds the PEAR path and references it. However, if the virtual host does not have PEAR installed, we have to install it on our own.

Installing PEAR is a simple process, so you don't have to worry about it. let's take a look at the Help Manual. the link is here (because many people cannot figure out the PEAR file structure, so this manual has been deleted), but it does not matter. you can go to this link to see it. Few people may have the patience to look at it. I cannot see it anyway. In fact, the most important thing is this line, which is to tell you how to add the default include path for php.

Now, let's start with the installation steps:

First, we recommend the folder "tutor" under the root directory of the website, and create a folder inc to download PEAR. The latest version is http://download.pear.php.net/package/pear-1.6.1.tgz.
After downloading and decompressing, put PEAR under the inc directory and expand the directory;
Includedefine,]. define, WEB_DIR. // path of the PEAR Directory
, PEAR_DIR. PATH_SEPARATOR.?>
Open http: // 127.0.0.1/tutor/demo. php again. what do you find? The error disappears!
Now PEAR installation is complete

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.