沃梦达 / 编程问答 / php问题 / 正文

安装 PEAR for PHPUnit 时的系统或本地

System or local when installing PEAR for PHPUnit(安装 PEAR for PHPUnit 时的系统或本地)

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

问题描述

我正在使用 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 的本地副本,那么您将需要相应地调整您的包含路径.

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

这篇关于安装 PEAR for PHPUnit 时的系统或本地的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:安装 PEAR for PHPUnit 时的系统或本地

基础教程推荐