PHP code example of melody-chen / api-auto-doc
1. Go to this page and download the library: Download melody-chen/api-auto-doc library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
melody-chen / api-auto-doc example snippets
# apidoc.php
\ApiDocBuilder();
//第一个参数为当前需要生成文档的类地址
//第二个参数为生成的API文件目录
//第三个参数为当前文件生成后的标题
//第四个参数为API文件名需加上后缀
//第五个参数为API文件的访问完整域名
//第六个参数为查看全部API的密码
$api->buildApiDoc(['ApiDoc\TestApi'],__DIR__ . '/apidocs/','测试API平台','api.html','apidocs/api.html','hello');
echo '创建完成';
$ php apidoc.php