On some hosts, you may not have the permission to modify the system's default pear installation, but want to install your own pear package. In this case, there is also a simple way to achieve:
Create a pear configuration file under your home. pearrc:
$ Pear config-create $ HOME. pearrc
If everything goes well, proceed to the next step. Otherwise, run the following command:
$ Pear config-set download_dir/home/(username)/tmp/pear/cache
$ Pear config-set cache_dir/home/(username)/tmp/pear/cache
$ Pear config-set temp_dir/home/(username)/tmp/pear/temp
Then you can start to install pear, which will be connected to the pear dependency file:
$ Pear install-o PEAR
After this step, pear has been installed. If you want to install other packages, then:
$ Pear install pear/PackageName
In this way, you have a customized pear package. To call these pear packages in your program, you need to thank you for writing some additional code. After all, these codes are not in your shortde_path.
Php4
PLAIN TEXT
CODE:
Ini_set (
Include_path,
Ini_get (include_path). PATH_SEPARATOR. "/home/(youruser)/pear/php"
);
Php5
PLAIN TEXT
CODE:
Set_include_path (
Get_include_path ().
PATH_SEPARATOR./home/(youruser)/pear/php
);
Author: volcano was published on March 13, 2007 at am.
Copyright information: this information can be reproduced at will. During reprinting, you must mark the original source and author information of the article in the form of hyperlinks and this statement.
Permanent Link-http://www.ooso.net/index.php/archives/327