安装程序包含在Wamp上的PEAR的path

安装PEAR并遵循http://www.phpunit.de/manual/current/en/installation.html中的指导:

pear config-set auto_discover 1 pear install pear.phpunit.de/PHPUnit. 

然后,我创build了testing:

 <?php # error reporting ini_set('display_errors',1); error_reporting(E_ALL|E_STRICT); # include TestRunner require_once 'PHPUnit/TextUI/TestRunner.php'; # our test class class ExampleTest extends PHPUnit_Framework_TestCase { public function testOne() { $this->assertTrue(FALSE); } } # run the test $suite = new PHPUnit_Framework_TestSuite('ExampleTest'); PHPUnit_TextUI_TestRunner::run($suite); ?> 

我在php.ini文件中包含以下内容并重新启动Apache:

 include_path = ".;C:\Program Files/wamp/bin/php/php5.3.8" include_path = ".;C:\Program Files/wamp/bin/php/php5.3.8/pear" include_path = ".;C:\Program Files/wamp/bin/php/php5.3.8/pear/PHPUnit" 

我得到Warning: require_once(PHPUnit/TextUI/TestRunner.php) [function.require-once]: failed to open stream: No such file or directory in ...

为什么包含path不起作用? 是否因为Program files有空格?

在Windows XP和WAMP中工作。

编辑:我更新了build议的path。

echo ini_get('include_path');的输出 在require_once之前调用是:

 .;C:\Program Files/wamp/bin/php/php5.3.8/pear 

此外,删除require_once命令会引发Fatal error: Class 'PHPUnit_Framework_TestCase' not found in...

Solutions Collecting From Web of "安装程序包含在Wamp上的PEAR的path"