Home  >  Article  >  Backend Development  >  Windows装配PEAR以及PHPUnit

Windows装配PEAR以及PHPUnit

WBOY
WBOYOriginal
2016-06-13 13:17:08726browse

Windows安装PEAR以及PHPUnit
WAMP环境,安装PEAR扩展,遇到了些问题,记录如下。

1
问题:pear does not have a signaturePHP....
解决:修改php.ini文件,找到,phar.require_hash, 将注释去掉,然后改为
phar.require_hash = Off

2
问题:无法找到 require_once(Structures/Graph.php)...
解决:查看PEAR目录,发现没有Structures文件夹,是缺少文件导致。于是下载文件,解压,然后将解压文件下的Structures目录拷贝到PEAR的PEAR目录下,形如:PEAR\PEAR\Sturctures

3
问题:无法找到文件 require_once(Structires/Graph/Node.php)
解决:打开相应的PHP文件,初步判断是文件引用时,没有找到对应的文件。修改相应的路径:

Graph.php

require_once 'PEAR/Structures/Graph/Node.php';

Node.php

require_once 'PEAR/Structures/Graph.php';

AcyclicTest.php

require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';

TopologicalSorter.php

require_once 'PEAR/Structures/Graph.php';
require_once 'PEAR/Structures/Graph/Node.php';
require_once 'PEAR/Structures/Graph/Manipulator/AcyclicTest.php';

4.更新PEAR: pear upgrade

5.安装PHPUnit: pear install phpunit/PHPUnit

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn