创建本地的PEAR
Jun 13, 2016 am 10:35 AM
在某些主机上,你可能没有修改系统缺省安装pear的权限,但是又希望安装自己的pear包。这种情况下也有简单的办法实现: 首先在自己的home下创建一份pear的配置文件.pearrc: 如果一切顺利的话,直接进行下一步,否则运行一下下列命令: 经过这一步,pear已经安装完成,如果你还希望安装其它的package,那么: 这样你就有了一份自己定制的pear包,为了在程序中调用到这些pear,你需要多谢写一些额外的代码,毕竟这些代码还不在你的include_path中。 php4 PLAIN TEXT PLAIN TEXT 版权信息:可以任意转载, 转载时请务必以超链接形式标明文章原始出处和作者信息及此声明 永久链接 - http://www.ooso.net/index.php/archives/327
$ pear config-create $HOME .pearrc
$ 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
接着就可以开始安装pear了,这会连着pear的依赖文件一块安装:
$ pear install -o PEAR
$ pear install pear/PackageName
CODE:
ini_set(
include_path,
ini_get(include_path).PATH_SEPARATOR."/home/(youruser)/pear/php"
);
php5
CODE:
set_include_path(
get_include_path().
PATH_SEPARATOR./home/(youruser)/pear/php
);
作者:volcano发表于6月 16, 2007 at 7:46 am

Article chaud

Outils chauds Tags

Article chaud

Tags d'article chaud

Bloc-notes++7.3.1
Éditeur de code facile à utiliser et gratuit

SublimeText3 version chinoise
Version chinoise, très simple à utiliser

Envoyer Studio 13.0.1
Puissant environnement de développement intégré PHP

Dreamweaver CS6
Outils de développement Web visuel

SublimeText3 version Mac
Logiciel d'édition de code au niveau de Dieu (SublimeText3)

Sujets chauds

Comment changer le nom personnel dans le groupe sur DingTalk_Comment modifier le nom personnel dans le groupe sur DingTalk

Activez les autorisations root en un seul clic (obtenez rapidement les autorisations root)

La multiplication matricielle universelle de CUDA : de l'entrée à la maîtrise !

Le système de conduite intelligent Qiankun ADS3.0 de Huawei sera lancé en août et sera lancé pour la première fois sur Xiangjie S9

Comment installer des applications Android sur Linux ?

Comment installer Podman sur Ubuntu 24.04
