2 Star 25 Fork 12

hkargc/paipan

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
demo.php 989 Bytes
一键复制 编辑 原始数据 按行查看 历史
<?php
include(__DIR__ . '/lib/class.paipan.php');
$p = new paipan();
if($_POST['act'] == 'fatemaps'){
$p->zwz = false;
$d = $_POST['param'];
$o = $p->fatemaps($d[0],$d[1],$d[2],$d[3],$d[4],$d[5],$d[6],$d[7],$d[8]);
die(json_encode($o));
}
$fm = $p->fatemaps(0, 1990, 1, 1, 12, 0, 0, 120, 35);
print_r($fm);
$tg = $fm['tg'];
$dz = $fm['dz'];
$ckey = array(
0 => '年柱',
1 => '月柱',
2 => '日柱',
3 => '时柱',
4 => '大运',
5 => '流年',
6 => '流月',
7 => '流日',
8 => '流时'
);
$tgdz = array(
0 => '天干',
1 => '地支'
);
//$tg = [0,1,2,3,4,5,6,7,5];
//$dz = [0,1,4,8,11,6,2,5,6];
$gxs = $p->GetGX($tg, $dz);
foreach ($gxs as $type => $list){ //$type指示0天干1地支
foreach ($list as $gx){
$a = [];
foreach ($gx[0] as $k => $v){
$a[] = $ckey[$k] . $tgdz[$gx[1][0]];
}
echo implode('+', $a) . ':' . $gx[1][4]."<br />\n";
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/hkargc/paipan.git
[email protected]:hkargc/paipan.git
hkargc
paipan
paipan
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385