我已经使用 pyrus 安装了 Console_CommandLine:
php pyrus.phar install pear/Console_CommandLine
安装 Console_CommandLine 的目录具有下一个结构
(/A_PATH/lib/
:)
lib/
├── cache
├── data
├── docs
├── downloads
├── php
└── tests
我尝试了下一个:(/A_PATH/demo.php
)
<?php
require_once 'lib/Console_CommandLine/php/Console/CommandLine.php';
...
?>
但我有下一个错误:
PHP Warning: require_once(Console/CommandLine/Exception.php): failed to open stream: No such file or directory in /A_PATH/lib/Console_CommandLine/php/Console/CommandLine.php on line 32
PHP Fatal error: require_once(): Failed opening required 'Console/CommandLine/Exception.php' (include_path='.:/usr/share/php:/usr/share/pear') in /A_PATH/lib/Console_CommandLine/php/Console/CommandLine.php on line 32
如何将 CommandLine.php 文件用于我的个人项目?