phpdocumentor生成代码注释文档(linux)

Posted 一只猪儿虫

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了phpdocumentor生成代码注释文档(linux)相关的知识,希望对你有一定的参考价值。

1,默认安装lnmp环境(php7),默认pear安装

2,   pear channel-discover pear.phpdoc.org

     pear install phpdoc/phpDocumentor

3,安装成功以后,可以使用 ,phpdoc命令

4,默认执行路径是  /usr/local/php/bin/phpdoc , 所以加一个软连接 ln -s /usr/local/php/bin/phpdoc  /usr/local/bin

5,使用方式

     A , 把当前目录生成api文档到当前docx文件下面的api文件夹命令(生成完毕后,用浏览器打开index.html文件就行了): phpdoc -d ./ -t ./docs/api  ,

 B,  更换模板 :phpdoc -d "./src" -t "./docs/api" --template="checkstyle"  ( 参考文档:https://docs.phpdoc.org/getting-started/changing-the-look-and-feel.html )

  C, 

以上是关于phpdocumentor生成代码注释文档(linux)的主要内容,如果未能解决你的问题,请参考以下文章

PhpDocumentor 生成文档

PHPDocument 代码注释规范总结

来自PHP代码的自动文档

怎样安装phpDocumentor

PHP Documentor 中的注释关联数组

解析centos中Apache、php、mysql 默认安装路径