我试图开始使用phpDocumentor。我的问题是它只生成一个img,css,js文件夹和一个structure.xml文件。
我目前在c:/ xampp / htdocs中创建了一个名为phpTest的文件夹,其中包含1个带有类和一些docBlox注释的文件index.php
我已经使用pear和命令提示符安装了phpDocumentor
所以我目前正在运行cmd
输入cd c:/ xampp / htdocs / phptest
phpDocs -d c:/ xampp / htdocs / phptest -t c:/ 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);
}
?>
答案 0 :(得分:0)
请确保您的docblock以斜杠星号星号开头,而不是斜杠星号的PHP常规注释语法。另外,请确保docblock中至少包含一些标记(例如@package MyPackage)。 phpDoc将不会看到常规注释块,因此这可能是生成任何内容的原因。
答案 1 :(得分:0)
这可能是因为PHP会在您的文件中报告语法错误。这条线
public var $arrayvar = array();
应该是
public $arrayvar = array();
或
var $arrayvar = array();