我正在尝试在我的ubuntu13.04上安装phploc,但它似乎不起作用,下面是我遵循的步骤。
$ sudo pear config-set auto_discover 1
$ sudo pear install phpunit/phploc
phpunit/phploc can optionally use PHP extension "bytekit"
downloading phploc-1.7.4.tgz ...
Starting to download phploc-1.7.4.tgz (10,134 bytes) .....
done: 10,134 bytes
install ok: channel://pear.phpunit.de/phploc-1.7.4 .de/phploc然后,当我输入phploc时,它就会出现这个错误。
$ phploc PHP警告: require_once(SebastianBergmann/FinderFacade/autoload.php):未能打开流:phploc跟踪第44行的/usr/share/php/SebastianBergmann/PHPLOC/autoload.php中没有这样的文件或目录:PHP1..{main}() /usr/bin/phploc:0 PHP.2。要求() /usr/bin/phploc:48 PHP致命错误: require_once():未能打开所需的‘SebastianBergmann/FinderFacade/autooload.php’(包括_path=‘./usr/share/ PHP;第44行phploc跟踪中的/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/'):PHP1.main}()/usr/bin/phploc:0php2. /usr/share/php/SebastianBergmann/PHPLOC/autoload.php () /usr/bin/phploc:48
以下是我的php包含路径
$ php -i | grep include <br>
allow_url_include => Off => Off
include_path => .:/usr/share/php.:/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/ => .:/usr/share/php.:/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/
MYSQL_INCLUDE => -I/usr/include/mysql
xdebug.collect_includes => On => On
and included in the distribution in the file: LICENSE发布于 2013-09-29 14:38:42
发布于 2013-10-30 12:55:04
我从https://github.com/sebastianbergmann/phploc下载了phploc存档,将其移到/usr/bin/phploc.phar。
然后我在我的.bashrc中创建了一个别名,如下所示: phploc='/usr/bin/phploc.phar‘
现在我可以像这样访问phploc了
root@# phploc phploc 1.7.4作者: Sebastian Bergmann.
用途: phploc开关..。
-计数-测试计数PHPUnit测试用例类和测试方法。
-log- XML写入结果以XML格式写入文件。-日志- CSV写入结果以CSV格式写入文件。
-排除在代码分析之外。-要检查的逗号分隔的文件名列表。(缺省值:*.php)
-帮助打印此使用信息。-版本打印版本并退出。
-进度打印进度条。
https://stackoverflow.com/questions/18481344
复制相似问题