phpunit致命错误 - require_once找不到包含在路径上的文件

时间:2010-12-31 09:37:07

标签: phpunit

我已经使用pear安装了phpunit版本3.5.6并且使用了必需的dependecies pear install --alldeps phpunit / PHPUnit,这很好。

当我从命令行运行phpunit时(例如(phpunit fleet.php))会产生致命错误并无法打开所需文件(请参阅下面的示例输出图像)。

我使用get_include_path检查了include_path,输出如下。 C:\ PHP; C:\ PHP \梨; C:\ PHP中\包括; C:\的Inetpub \图书馆;

系统路径还包含c:\ php \ pear

请告知如何让这个运行。 alt text

1 个答案:

答案 0 :(得分:1)

问题似乎是包含路径

通过set_include_path( '\ PHP中\梨');

我在第一个require_once语句之前将上面的行添加到c:\ php \ phpunit ... (require_once'PHPUnit / Util / Filter.php')

之后PHPUnit工作正常。从php.ini

读取包含路径时一定存在问题

include_path =“。; c:\ php \ pear \; c:\ PHP; c:\ php \ includes; c:\ Inetpub \ Library; c:\ Inetpub \ ZendFramework-1.10.6 \ library”

我试过...... C:\ PHP中\梨\; C:\ PHP中\梨; \ PHP \梨\ \ PHP \梨

以上所有都无法解决问题。

相关问题