0

0

在WINDOWS下安装PEAR,WINDOWS安装PEAR_PHP教程

php中文网

php中文网

发布时间:2016-07-13 10:22:02

|

1664人浏览过

|

来源于php中文网

原创

在windows下安装pear,windows安装pear

 

一、从官网下载go-pear.phar 文件,地址http://pear.php.net/go-pear.phar

将下载好的文件go-pear.phar 放到PHP安装目录下,dos 命令下进入PHP安装目录 运行 php go-pear.phar,遇到提问选项,全部回车按默认选择。如果在一分钟内未按下回车键,则会提示错误然后退出。这时只要重新执行go-pear.bat即可。

 如果运行成功,会如图所示:

立即学习PHP免费学习笔记(深入)”;

安装完毕后,会在PHP安装目录下,生成一个pear_env.arg的注册表文件,双击该文件,将信息添加入注册表即可。

 

安装Mail插件:D:\mvam\php5> pear install mail

 

安装MDB2插件:D:\mvam\php5> pear install MDB2

 

 安装PHPUnit插件:

凌夕卡密微商城
凌夕卡密微商城

卡密微商城支持三级分销,拥有唯一的推广链接,一次推广,三级奖励,可以查看下级会员统计信息,购买卡密之后自动显示卡密信息,无需等待,支持卡密充值、支付宝充值,可以在线提现。开发语言:JAVA开发框架:Struts2+Spring+Hibernate后台用到Freemarker模板引擎服务器环境:JDK1.7Tomcat7.0Mysql5.1演示网站用户名:admin,密码:222222安装教程:1、

下载

D:\mvam\php5> pear config-set auto_discover 1 

D:\mvam\php5>pear install pear.phpunit.de/PHPUnit

如图:

 

把phpunit加入环境变量,然后 phpunit --help   可以看到全部用法,如下:
D:\mvam\php5>phpunit --help
PHPUnit 4.0.17 by Sebastian Bergmann.

You have installed PHPUnit via PEAR. This installation method is no longer
supported and http://pear.phpunit.de/ will be shut down no later than
December, 31 2014.

Please read http://phpunit.de/manual/current/en/installation.html and
learn how to use PHPUnit from a PHAR or install it via Composer.

Usage: phpunit [options] UnitTest [UnitTest.php]
       phpunit [options]

Code Coverage Options:

  --coverage-clover   Generate code coverage report in Clover XML format.
  --coverage-crap4j   Generate code coverage report in Crap4J XML format.
  --coverage-html      Generate code coverage report in HTML format.
  --coverage-php      Export PHP_CodeCoverage object to file.
  --coverage-text=    Generate code coverage report in text format.
                            Default: Standard output.
  --coverage-xml       Generate code coverage report in PHPUnit XML format.


Logging Options:

  --log-junit         Log test execution in JUnit XML format to file.
  --log-tap           Log test execution in TAP format to file.
  --log-json          Log test execution in JSON format.
  --testdox-html      Write agile documentation in HTML format to file.
  --testdox-text      Write agile documentation in Text format to file.

Test Selection Options:

  --filter         Filter which tests to run.
  --testsuite      Filter which testsuite to run.
  --group ...               Only runs tests from the specified group(s).
  --exclude-group ...       Exclude tests from the specified group(s).
  --list-groups             List available test groups.
  --test-suffix ...         Only search for test in files with specified
                            suffix(es). Default: Test.php,.phpt

Test Execution Options:

  --report-useless-tests    Be strict about tests that do not test anything.
  --strict-coverage         Be strict about unintentionally covered code.
  --disallow-test-output    Be strict about output during tests.
  --enforce-time-limit      Enforce time limit based on test size.
  --strict                  Run tests in strict mode (enables all of the above).


  --process-isolation       Run each test in a separate PHP process.
  --no-globals-backup       Do not backup and restore $GLOBALS for each test.
  --static-backup           Backup and restore static attributes for each test.

  --colors                  Use colors in output.
  --stderr                  Write to STDERR instead of STDOUT.
  --stop-on-error           Stop execution upon first error.
  --stop-on-failure         Stop execution upon first error or failure.
  --stop-on-risky           Stop execution upon first risky test.
  --stop-on-skipped         Stop execution upon first skipped test.
  --stop-on-incomplete      Stop execution upon first incomplete test.
  -v|--verbose              Output more verbose information.
  --debug                   Display debugging information during test execution.


  --loader          TestSuiteLoader implementation to use.
  --repeat           Runs the test(s) repeatedly.
  --tap                     Report test execution progress in TAP format.
  --testdox                 Report test execution progress in TestDox format.
  --printer        TestSuiteListener implementation to use.

Configuration Options:

  --bootstrap         A "bootstrap" PHP file that is run before the tests.

  -c|--configuration Read configuration from XML file.
  --no-configuration        Ignore default configuration file (phpunit.xml).
  --include-path   Prepend PHP's include_path with given path(s).
  -d key[=value]            Sets a php.ini value.

Miscellaneous Options:

  -h|--help                 Prints this usage information.
  --version                 Prints the version and exits.

  --self-update             Update PHPUnit to the latest version.   配置 PHP.ini文件

告诉PHP你的PEAR安装目录

将php.ini中的include_path修改为PEAR安装目录 include_path = ".;D:/mvam/php5/pear"

如图:

二、安装包的方法:

PHP目录下,用命令行方式执行pear install –a Auth  就会在PHP\PEAR 目录下建立AUTH目录,目录中包含文件包。-a选项表明安装Auth包所依赖的所有其他包。

windows下xampp怎安装pear? 我是win7系统,看人家的答案,都说运行 go-pearbat

呵呵 这不你已经有了 go-pear.phar 文件了,那就好办了,请如下操纵:
1、打开命令提示符(附件里面有)或者在运行中输入 cmd 。
2、找到你那个go-pear.phar所在的目录,使用 cd 命令切换过去。
3、然后在命令提示符中使用 php go-pear.phar 进行pear的安装。
4、手动配置下各个选项即可。

Good Luck~~
 

在windows平台下手动安装Structures_Graph-104,pear install Structures_Graph-104,出错了

错误,不能打开Structures_Graph-1.0.4.tgz文件,这是翻译,软件我不认识,帮不了你。
 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/851759.htmlTechArticle在WINDOWS下安装PEAR,WINDOWS安装PEAR 一、从官网下载go-pear.phar 文件,地址http://pear.php.net/go-pear.phar 将下载好的文件 go-pear.phar 放到 PHP 安装目录...

相关专题

更多
php源码安装教程大全
php源码安装教程大全

本专题整合了php源码安装教程,阅读专题下面的文章了解更多详细内容。

65

2025.12.31

php网站源码教程大全
php网站源码教程大全

本专题整合了php网站源码相关教程,阅读专题下面的文章了解更多详细内容。

43

2025.12.31

视频文件格式
视频文件格式

本专题整合了视频文件格式相关内容,阅读专题下面的文章了解更多详细内容。

35

2025.12.31

不受国内限制的浏览器大全
不受国内限制的浏览器大全

想找真正自由、无限制的上网体验?本合集精选2025年最开放、隐私强、访问无阻的浏览器App,涵盖Tor、Brave、Via、X浏览器、Mullvad等高自由度工具。支持自定义搜索引擎、广告拦截、隐身模式及全球网站无障碍访问,部分更具备防追踪、去谷歌化、双内核切换等高级功能。无论日常浏览、隐私保护还是突破地域限制,总有一款适合你!

41

2025.12.31

出现404解决方法大全
出现404解决方法大全

本专题整合了404错误解决方法大全,阅读专题下面的文章了解更多详细内容。

204

2025.12.31

html5怎么播放视频
html5怎么播放视频

想让网页流畅播放视频?本合集详解HTML5视频播放核心方法!涵盖<video>标签基础用法、多格式兼容(MP4/WebM/OGV)、自定义播放控件、响应式适配及常见浏览器兼容问题解决方案。无需插件,纯前端实现高清视频嵌入,助你快速打造现代化网页视频体验。

9

2025.12.31

关闭win10系统自动更新教程大全
关闭win10系统自动更新教程大全

本专题整合了关闭win10系统自动更新教程大全,阅读专题下面的文章了解更多详细内容。

8

2025.12.31

阻止电脑自动安装软件教程
阻止电脑自动安装软件教程

本专题整合了阻止电脑自动安装软件教程,阅读专题下面的文章了解更多详细教程。

3

2025.12.31

html5怎么使用
html5怎么使用

想快速上手HTML5开发?本合集为你整理最实用的HTML5使用指南!涵盖HTML5基础语法、主流框架(如Bootstrap、Vue、React)集成方法,以及无需安装、直接在线编辑运行的平台推荐(如CodePen、JSFiddle)。无论你是新手还是进阶开发者,都能轻松掌握HTML5网页制作、响应式布局与交互功能开发,零配置开启高效前端编程之旅!

2

2025.12.31

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号