最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

windows下安裝pear及phpunit(注意配置好php命令行環(huán)境)

 更新時間:2011年05月22日 19:45:30   作者:  
windows下安裝pear及phpunit(注意配置好php命令行環(huán)境),需要的朋友可以參考下。
安裝環(huán)境
  在安裝PEAR之前需要配置安裝PHP環(huán)境,如果沒有自帶PEAR

(直接訪問http://go-pear.org并保存其首頁為go-pear.php)

PEAR安裝準(zhǔn)備

  如果PHP運行環(huán)境沒有自帶PEAR,則需要下載go-pear.php文件,同時保存在php.exe所在的目錄下。

PEAR安裝步驟

1、我這里用的是wamp集成環(huán)境,d:\wamp\bin\php\php5.2.5>go-pear,開始自動安裝。

通過這個PEAR安裝截圖,可以看到首先需要確認(rèn)PEAR的安裝目錄結(jié)構(gòu),系統(tǒng)通常能自動識別。

2、確認(rèn)好PEAR在Windows下的安裝目錄結(jié)構(gòu),回車,開始下載和安裝PEAR的默認(rèn)擴展包,你也可以選擇是否同時安裝Pear_Frontend_Web-beta,Pear_Frontend_Gtk2,MDB2擴展包。

3、PEAR默認(rèn)擴展包安裝后,提示是否需要配置php.ini文件中的include_path選項指向pear的安裝目錄,當(dāng)然需要配置,否則無法使用,Y并回車,安裝包會自動修改include_path選項。

PEAR安裝完成,雙擊PEAR_ENV.reg將相關(guān)信息導(dǎo)入注冊表,同時重啟Apache即可。


PEAR的其他安裝方法

  如果PHP運行環(huán)境自帶PEAR,則可以在PHP目錄下找到PEAR.DAT文件,雙擊這個文件即可進行PEAR安裝,方式應(yīng)該類似上述安裝方式。同時注意修改PHP.INI中的include_path選項即可。

PEAR命令

  在命令行方式下,運用PEAR的相關(guān)命令可以安裝自己需要的PEAR安裝包。

  pear help  列出pear的所有命令,類似于pear的命令幫助命令。

  pear help <command>  列出某個pear命令的具體信息

  pear help shortcuts  列出所有pear命令的簡寫

  pear list-all  列出所有可安裝的packages,很多,可以訪問pear擴展包列表找到需要的packages,再使用pear install命令安裝package。

(安裝pear時,可以讓其使用默認(rèn)值,一直回車完。)

 

接著安裝單元測試框架phpunit:

d:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
Adding Channel "pear.phpunit.de" succeeded
Discovery of channel "pear.phpunit.de" succeeded

d:\wamp\bin\php\php5.2.5>pear install phpunit/PHPUnit
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit requires PEAR Installer (version >= 1.8.1), installed version is
 1.6.1
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
No valid packages found
install failed
(安裝phpunit失敗,此時通過pear upgrade pear更新pear后繼續(xù)安裝)

d:\wamp\bin\php\php5.2.5>pear upgrade pear
downloading PEAR-1.9.0.tgz ...
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
......

d:\wamp\bin\php\php5.2.5>pear info pear
ABOUT PEAR.PHP.NET/PEAR-1.9.0
......

d:\wamp\bin\php\php5.2.5>pear channel-discover pear.phpunit.de
Channel "pear.phpunit.de" is already initialized

d:\wamp\bin\php\php5.2.5>pear install phpunit/PHPUnit
Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: pear/Image_GraphViz, pear/Log, channel:/
/pear.symfony-project.com/YAML, use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2
.1)
phpunit/PHPUnit can optionally use package "pear/Log"
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "pdo_sqlite"
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5)
downloading PHPUnit-3.4.13.tgz ...
Starting to download PHPUnit-3.4.13.tgz (254,903 bytes)
.....................................................done: 254,903 bytes
install ok: channel://pear.phpunit.de/PHPUnit-3.4.13

phpunit安裝完畢,可輸入phpunit測試

相關(guān)文章

最新評論

珠海市| 土默特左旗| 京山县| 荥阳市| 和平县| 双桥区| 米脂县| 寿宁县| 台中市| 盱眙县| 鄄城县| 霸州市| 泰来县| 营口市| 百色市| 垫江县| 怀集县| 共和县| 南通市| 阿拉善盟| 霍林郭勒市| 黎平县| 宝兴县| 南雄市| 中方县| 和林格尔县| 饶阳县| 嘉禾县| 阳春市| 手机| 农安县| 旬邑县| 武义县| 宽城| 罗江县| 呼玛县| 南溪县| 肃北| 齐河县| 密山市| 临清市|