在为PHPUnit安装PEAR时是系统还是本地 [英] System or local when installing PEAR for PHPUnit

查看:91
本文介绍了在为PHPUnit安装PEAR时是系统还是本地的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用XAMPP 1.8.1. 我需要用PHPUnit编写代码. 当我尝试使用命令提示符安装PEAR时,出现以下消息:

I am using XAMPP 1.8.1. I need to write code with PHPUnit. When I try to install PEAR using command prompt, I get the message below:

您要安装系统范围的PEAR还是本地副本?

Are you installing a system-wide PEAR or a local copy?

有人可以建议我应该使用哪个选项吗? 预先感谢.

Could some one suggest which option I should use? Thanks in advance.

推荐答案

PEAR通常在系统范围内安装.这样做的好处是可以在不同的项目之间重用各种软件包.

PEAR is usually installed system-wide. The benefit of this is that the various packages can be reused between different projects.

安装PEAR的本地副本的原因之一是您正在安装服务器的管理员可能不愿意安装其他软件包或升级现有软件包.

One reason why you might install a local copy of PEAR is that the administrator[s] of the server you are installing on might be reluctant to install additional packages or upgrade existing ones.

通过执行PEAR的本地安装,您可以选择PEAR安装程序放置要安装的软件包/PEAR代码的位置.

By performing a local install of PEAR you can choose the location of where the PEAR installer places the packages/PEAR code that you install.

因此,安装本地甚至多个PEAR副本的另一个原因是,对于您可能正在处理的每个项目,都有单独的安装,尽管在这种情况下使用Composer更为常见.

So, another reason for installing local, even multiple, copies of PEAR is to have separate installs for each project you might be working on, though using Composer in this scenario is much more common place.

自然,如果您确实安装了PEAR的本地副本,则需要相应地调整include-path.

Naturally if you do install a local copy of PEAR then you will need to adjust your include-path accordingly.

这篇关于在为PHPUnit安装PEAR时是系统还是本地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆