1 Star 0 Fork 6

jiangxin310b / yingdun-api

forked from orchief / yingdun-api 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
index.php 667 Bytes
一键复制 编辑 原始数据 按行查看 历史
大飞 提交于 2018-05-24 17:22 . message
<?php
header('Content-type: application/json'); //json
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$arrUrl = explode('/', $url);
if ($arrUrl[1] == 'versionList') {
// 实现版本列表
$resource = scandir("./");
$blackArr = ['..', '.', '.git'];
foreach ($resource as $k => $v) {
if (!in_array($v, $blackArr) and is_dir($v)) {
$res[] = $v;
}
}
$resArr = [
'code' => 200,
'data' => [
'list' => $res,
'dataCount' => count($res),
],
];
echo json_encode($resArr, JSON_UNESCAPED_UNICODE);return;
}
echo '{"code": 400, "error": "版本不存在!"}';
PHP
1
https://gitee.com/jiangxin310b/yingdun-api.git
git@gitee.com:jiangxin310b/yingdun-api.git
jiangxin310b
yingdun-api
yingdun-api
master

搜索帮助