phpunit 致命错误 - require_once 未找到似乎位于包含路径上的文件

发布于 2024-10-10 00:29:30 字数 392 浏览 0 评论 0原文

我已经使用 pear 安装了 phpunit 版本 3.5.6 并使用所需的依赖项 pear install --alldeps phpunit/PHPUnit 一切顺利。

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

我已经使用 get_include_path 检查了 include_path ,输出如下。 c:\PHP; c:\PHP\pear; c:\php\includes; c:\Inetpub\Library;

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

请告知如何运行它。 替代文本

I've installed phpunit version 3.5.6 using pear and required dependecies using
pear install --alldeps phpunit/PHPUnit which went fine.

When I run phpunit from the command line such as (phpunit fleet.php) it produces a fatal error and fails opening required files (see sample output image below).

I have checked the include_path using get_include_path and the output is as follows.
c:\PHP; c:\PHP\pear; c:\php\includes; c:\Inetpub\Library;

The system path also contains c:\php\pear

Please advise how to get this running.
alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

愚人国度 2024-10-17 00:29:30

问题似乎出在包含路径上,通常是

set_include_path('\php\pear');

我在第一个 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\pear\;
c:\php\pear;
\php\梨\
\php\pear

以上均无法解析路径。

The issue appears to be with include paths generally

set_include_path('\php\pear');

I added the above line to c:\php\phpunit before the first require_once statement which goes...
(require_once 'PHPUnit/Util/Filter.php')

After that PHPUnit worked fine. There must be an issue with the include path as read from php.ini

include_path=".; c:\php\pear\; c:\PHP; c:\php\includes; c:\Inetpub\Library; c:\Inetpub\ZendFramework-1.10.6\library"

I have tried...
c:\php\pear\;
c:\php\pear;
\php\pear\
\php\pear

All of the above fail to resolve the path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文