2017-06-04 40 views
0

這是我的配置梨,我會執行php doc命令時出現此錯誤。林在Mac OS塞拉利昂和我的php -v PHP是30年6月5日(CLI)(建:2017年2月7日16時18分37秒)PHP文檔不能在Mac OS Sierra上工作

phpdoc --filename first-doc.php -t docs 
PHP Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /usr/local/bin/phpdoc on line 40 
PHP Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:') in /usr/local/bin/phpdoc on line 40 

enter image description here 請幫

+0

很明顯,這個文件'phpdoc'不存在於這個路徑中'/ usr/local/bin' –

回答

1

至少,你的PHP配置的include_path不包含主要PEAR php_dir位置。

注意錯誤信息顯示(include_path='.:'),這意味着它只包含你現在在shell中的當前目錄。

你的PEAR的配置顯示php_dir設置爲/usr/lib/php,所以需要添加到include_path設置在php.ini文件。

我真的很驚訝PEAR會在沒有正確設置include_path的情況下成功安裝任何東西,因爲PEAR程序本身應該無法自行運行。也許在安裝之後,include_path配置錯誤