当前位置: 首页 > 工具软件 > PhpDocumentor > 使用案例 >

如何安装phpDocumentor

常永怡
2023-12-01

前提条件

1.PHP5.3.3
2.PHP的intl扩展
3.Graphviz
4.PHP的XSL扩展(有些模板可能用的到)

安装方法

使用PEAR

$ pear channel-discover pear.phpdoc.org
$ pear install phpdoc/phpDocumentor

使用PHAR
下载PHAR,使用方法如下

$ php phpDocumentor.phar -d . -t docs/api

使用Composer

$ composer require "phpdocumentor/phpdocumentor:2.*"

更加详细的介绍可以参考官方文档

注意事项:

1.PHP版本为7.2的时候会报count的Waringing(phpDocumentor版本为2.9.0),PHP7.1没问题。
2.使用composer安装方法使用phpDocumentor会报错,暂未知原因,推荐使用下载PHAR,通过PHP来使用phpDocumentor。

 类似资料: