2

我试图开始使用 phpDocumentor。我的问题是它只生成一个 img、css、js 文件夹和一个 structure.xml 文件。

我目前在 c:/xampp/htdocs 中创建了一个名为 phpTest 的文件夹,其中包含 1 个文件 index.php 和一个类和一些 docBlox 注释

我已经使用 pear 和命令提示符安装了 phpDocumentor

所以我目前正在运行 cmd

键入 cd c:/xampp/htdocs/phptest

phpDocs -dc:/xampp/htdocs/phptest -tc:/xampp/htdocs/phptest/docs

docs 文件夹中的唯一输出是 3 个文件夹和 structure.xml 文件。是否应该有一个 index.hmtl 文件,其中包含所有可供我查看的文档?我如何让它显示出来?谢谢 这是我的测试 index.php 文件,我试图用 phpDocumentor 记录。

    <?php
/**
* File level docBlock
*@package Command
*/

/**
*This is the command class it is incharge
*Only has execute method
*@package Command
*@author Michael Booth
*@copyright 2012 bla bla
*/
abstract class Command{
/**
*keeps keys values
*@var array
*/
public var  $arrayvar = array();

/**
*executes method
*@param $int contains contextual data
*@return bool
*/
    abstract function execute($integer);
}

?>
4

2 回答 2

0

这可能是因为 PHP 会在您的文件中报告语法错误。线

public var  $arrayvar = array();

应该是

public $arrayvar = array();

或者

var $arrayvar = array();
于 2012-05-25T20:16:43.147 回答
0

确保您的文档块以 slash-asterisk-asterisk 开头,而不是 slash-asterisk 的 PHP 常规注释语法。另外,请确保您在文档块中至少有一些标签(例如@package MyPackage)。phpDoc 不会看到常规的注释块,因此这本身可能就是没有生成任何内容的原因。

于 2012-05-24T18:47:38.700 回答