第一步,环境要求php5.3以上,我的是php5.4,这个根据自己情况看看吧,我用的是wamp集成开发包
第二步,下载go-pear.phar, 我的php5.4里面没有go-pear.bat,所以得下载这个,下载地址http://pear.php.net/go-pear.phar
第三步,以管理员身份运行cmd,注意是管理员,这一步我犯二了,用普通用户,结果,中间自动创建文件夹失败
地虽不
第四步,运行 pear install phpdoc/phpDocumentor-alpha 时可能会有提示为
D:\php>pear install phpdoc/phpDocumentor-alpha
No releases available for package "pear.phpdoc.org/phpDocumentor"
install failed登录http://pear.phpdoc.org/,查看可使用的phpDocumentor下载地址,再次运行D:\php>pear install http://pear.phpdoc.org/get/phpDocumentor-2.0.0b6.tgz
downloading phpDocumentor-2.0.0b6.tgz 第六步,安装完成后运行phpdoc
Collecting files .. OK
Initializing parser .. OK
Parsing files.....第七步,登录https://github.com/phpDocumentor/phpDocumentor2 查看使用方法How to use phpDocumentor?
生成文档: phpdoc run -d <SOURCE_DIRECTORY> -t <TARGET_DIRECTORY>
查看帮助: phpdoc run -h
最后一下提示,就是我在安装的时候提示了一个‘The XSL writer was unable to find your.....’的错误,需要开启php.ini里面的这个extension=php_xsl.dll
最后附上一张api截图,PhpDocumentor2居然用上了bootstrap,看来bootstrap真的还是很强大的
 
		最佳答案
		