使用 MAMP 的 Netbeans 上的 phpdoc 不起作用


phpdoc on Netbeans using MAMP not working

我正在尝试让phpdoc在netbeans上工作,但是我收到以下错误

PHP Warning:  require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /Applications/MAMP/bin/php/php5.4.4/bin/phpdoc on line 40
PHP Fatal error:  require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:') in /Applications/MAMP/bin/php/php5.4.4/bin/phpdoc on line 40

当我跑步时 pear config-show在终端中,我得到以下php_dir路径

/Applications/MAMP/bin/php/php5.4.4/lib/php

我已经检查了 php.ini 文件是否退出,并且在

/Applications/MAMP/bin/php/php5.4.4/lib/php/phpDocumentor/phpDocumentor/phpdoc.ini

有谁知道问题可能是什么或如何解决它。我想使用 Netbeans 的 phpdoc,而不必每次更新文档时都恢复到终端。

你需要

在php中编辑include_path.ini以添加PEAR的php_dir值。 请注意,在错误消息中,您的include_path设置为"."。 因此,PHP 查找 PhpDocumentor/phpDocumentor/phpdoc.inc 的唯一位置就在您的/Applications/MAMP/bin/php/php5.4.4/bin 目录中。 一旦将/Applications/MAMP/bin/php/php/php5.4.4/lib/php 添加到include_path,PHP 将能够在运行时找到 phpdoc.inc 文件。