搜尋
首頁php教程php手册在WINDOWS下安装PEAR,WINDOWS安装PEAR

在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安装目录下,生成一个pear_env.arg的注册表文件,双击该文件,将信息添加入注册表即可。

 

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

 

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

 

 安装PHPUnit插件:

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文件,这是翻译,软件我不认识,帮不了你。
 

陳述
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn

熱AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover

AI Clothes Remover

用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool

Undress AI Tool

免費脫衣圖片

Clothoff.io

Clothoff.io

AI脫衣器

AI Hentai Generator

AI Hentai Generator

免費產生 AI 無盡。

熱門文章

R.E.P.O.能量晶體解釋及其做什麼(黃色晶體)
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳圖形設置
3 週前By尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您聽不到任何人,如何修復音頻
3 週前By尊渡假赌尊渡假赌尊渡假赌

熱工具

SublimeText3 Mac版

SublimeText3 Mac版

神級程式碼編輯軟體(SublimeText3)

PhpStorm Mac 版本

PhpStorm Mac 版本

最新(2018.2.1 )專業的PHP整合開發工具

Atom編輯器mac版下載

Atom編輯器mac版下載

最受歡迎的的開源編輯器

mPDF

mPDF

mPDF是一個PHP庫,可以從UTF-8編碼的HTML產生PDF檔案。原作者Ian Back編寫mPDF以從他的網站上「即時」輸出PDF文件,並處理不同的語言。與原始腳本如HTML2FPDF相比,它的速度較慢,並且在使用Unicode字體時產生的檔案較大,但支援CSS樣式等,並進行了大量增強。支援幾乎所有語言,包括RTL(阿拉伯語和希伯來語)和CJK(中日韓)。支援嵌套的區塊級元素(如P、DIV),

Dreamweaver Mac版

Dreamweaver Mac版

視覺化網頁開發工具