内容简介:翻译自:https://stackoverflow.com/questions/5022894/phpunit-wrong-path
有人知道我做错了什么吗?
我安装了phpunit,当我在/ opt / local / PEAR目录下时一切都很好,所以如果我去/ opt / local / PEAR目录并运行phpunit,我会得到:
PHPUnit 3.5.11 by Sebastian Bergmann.
Usage: phpunit [switches] UnitTest [UnitTest.php]
phpunit [switches]
blablabla
但如果我在另一条路上,我会得到:
Warning: require_once(PHP/CodeCoverage/Filter.php): failed to open stream: No such file or directory in /usr/local/bin/phpunit on line 38 Fatal error: require_once(): Failed opening required ‘PHP/CodeCoverage/Filter.php’ (include_path=’.:/usr/lib/php’) in /usr/local/bin/phpunit on line 38
我知道我的PATH有问题.我该如何解决?
尝试将/ opt / local / PEAR添加到php.ini文件include_path.
//Before: include_path='.:/usr/lib/php' //After: include_path='.:/usr/lib/php:/opt/local/PEAR'
您可能还需要重新启动Web服务器才能使更改生效.
正如RobertPitt评论的那样,这也可以在运行时完成而无需访问php.ini文件.
<?php $path = '/opt/local/PEAR'; set_include_path(get_include_path() . PATH_SEPARATOR . $path); ?>
翻译自:https://stackoverflow.com/questions/5022894/phpunit-wrong-path
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- 错误:构建离子时,android图标png不存在源路径
- 深入解析Java绝对路径与相对路径
- C#/.NET 如何确认一个路径是否是合法的文件路径
- GAC 与其物理路径
- 关键渲染路径优化
- 【Leetcode】62. 不同路径
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Web Caching
Duane Wessels / O'Reilly Media, Inc. / 2001-6 / 39.95美元
On the World Wide Web, speed and efficiency are vital. Users have little patience for slow web pages, while network administrators want to make the most of their available bandwidth. A properly design......一起来看看 《Web Caching》 这本书的介绍吧!