很多站长朋友们都不太清楚PHP是什么生肖,今天小编就来给大家整理PHP是什么生肖,希望对各位有所帮助,具体内容如下:
本文目录一览: 1、 12生肖图片,给我十二生肖闯江湖的每个生肖的图片 2、 php 自动计算12生肖 3、 PHP输入年份查询属相的代码。 12生肖图片,给我十二生肖闯江湖的每个生肖的图片提起12生肖图片,大家都知道,有人问给我十二生肖闯的每个生肖的图片,另外,还有人想问十二生肖守图片,你知道这是怎么回事?其实求12生肖,每个动物的一笔画图片,下面就一起来看看给我十二生肖闯的每个生肖的图片,希望能够帮助到大家!
12生肖图片
1、12生肖图片:给我十二生肖闯的每个生肖的图片
2、12生肖图片:十二生肖守图片
可能是洋酒,我瞎猜的
3、12生肖图片:求12生肖,每个动物的一笔画图片
到街上能买到这样的画画书
雨青一笔画,刚画完
网上能找到的呀2021年生肖49码图。
4、12生肖图片:十二生肖图片在哪找
;cl=2lm=-1nc=1ie=utf-8tn=imagepv=fm=rs1word=%E5%8D%81%E4%BA%8C%E7%94%9F%E8%82%96%E9%AB%98%E6%B8%85%E6%B5%B7%E6%8A%A5图片十二生肖图片。
昵图网上面有。12生肖全图。
在花几角钱可以买共享分,然后有他给的链接去下。
5、12生肖图片:谁有十二生肖的Q版、可爱图片一套的。大图的
可以吗?找了好久的,抄袭!!!!!(ˇˍˇ)、
6、12生肖图片:十二生肖的图片
每年生肖图片交接作者是谁?
图片上有
7、12生肖图片:十二生肖图片
——狂欢节的黑孩子
在美丽的群岛伤心上路之际,十二生肖图片大全集。
无话可说。
我们竟也成这样了。
你的芳香撩人——它带走夜晚
宣告的么你卑微的的?哈哈
;cl=2lm=-1tn=imagepv=word=%CA%AE%B6%FE%C9%FA%D0%A4z=0
;ct=lm=-1cl=2fm=psword=%CA%AE%B6%FE%C9%FA%D0%A412十二生肖图片。
8、12生肖图片:长命锁12生肖图片
是十二生肖
我看过金色的
求12生肖,每个动物的一笔画图片
9、12生肖图片:甲骨文十二生肖的图片
十二生肖49个数字表。
速度解决啊!!!~!~!~!~!~!~!~
10、12生肖图片:怎么画十二生肖的图片
11、12生肖图片:这图片里说的是什么意思,是十二生肖的什么动物
这不是鳄鱼么这应该是鳄鱼12生肖剪纸图片。
12、12生肖图片:求十二生肖的图片
;cl=2lm=-1tn=imagepv=word=%CA%AE%B6%FE%C9%FA%D0%A4z=0
以上就是与给我十二生肖闯的每个生肖的图片相关内容,是关于给我十二生肖闯的每个生肖的图片的分享。看完12生肖图片后,希望这对大家有所帮助!
php 自动计算12生肖<?php
//2002/10/23-->出生年月
/*
计算12个星座
计算12个生肖
计算年龄
*/
class timeage
{
public $y = 0;
public $m = 0;
public $d = 0;
public $age = 0;
public $time = 0;
public function __construct($time)
{
$this->time = $time;
$this->y = date('Y',$this->time);
$this->m = date('m',$this->time);
$this->d = date('d',$this->time);
}
public function getage()
{
$this->age = time() - $this->time;
$this->age = $this->age/60/60/24/365;
return (int)$this->age;
}
public function getconstellation()
{
switch ($this->m)
{
case 1:
if ($this->d < 19)
{
$this->constellation = '摩羯座';
return $this->constellation;
}
else
{
$this->constellation = '水瓶座';
return $this->constellation;
}
break;
case 2:
if ($this->d < 18)
{
$this->constellation = '水瓶座';
return $this->constellation;
}
else
{
$this->constellation = '双鱼座';
return $this->constellation;
}
break;
case 3:
if ($this->d < 20)
{
$this->constellation = '双鱼座';
return $this->constellation;
}
else
{
$this->constellation = '白羊座';
return $this->constellation;
}
break;
case 4:
if ($this->d < 19)
{
$this->constellation = '白羊座';
return $this->constellation;
}
else
{
$this->constellation = '金牛座';
return $this->constellation;
}
break;
case 5:
if ($this->d < 20)
{
$this->constellation = '金牛座';
return $this->constellation;
}
else
{
$this->constellation = '双子座';
return $this->constellation;
}
break;
case 6:
if ($this->d < 21)
{
$this->constellation = '双子座';
return $this->constellation;
}
else
{
$this->constellation = '巨蟹座';
return $this->constellation;
}
break;
case 7:
if ($this->d < 22)
{
$this->constellation = '巨蟹座';
return $this->constellation;
}
else
{
$this->constellation = '狮子座';
return $this->constellation;
}
break;
case 8:
if ($this->d < 22)
{
$this->constellation = '狮子座';
return $this->constellation;
}
else
{
$this->constellation = '处女座';
return $this->constellation;
}
break;
case 9:
if ($this->d < 22)
{
$this->constellation = '处女座';
return $this->constellation;
}
else
{
$this->constellation = '天秤座';
return $this->constellation;
}
break;
case 10:
if ($this->d < 23)
{
$this->constellation = '天秤座';
return $this->constellation;
}
else
{
$this->constellation = '天蝎座';
return $this->constellation;
}
break;
case 11:
if ($this->d < 22)
{
$this->constellation = '天蝎座';
return $this->constellation;
}
else
{
$this->constellation = '射手座';
return $this->constellation;
}
break;
case 12:
if ($this->d < 20)
{
$this->constellation = '射手座';
return $this->constellation;
}
else
{
$this->constellation = '摩羯座';
return $this->constellation;
}
break;
}
}
public function getzodiac()
{
$this->animals = array('鼠', '牛', '虎', '兔', '龙', '蛇','马', '羊', '猴', '鸡', '狗', '猪');
$this->zodiac = ($this->y - 1900) % 12;
return $this->animals[$this->zodiac];
}
}
$age = strtotime('1993-07-25');
echo $age;
$a = new timeage($age);
echo '<br>';
echo $a->y;
echo '<br>';
echo $a->m;
echo '<br>';
echo $a->d;
echo '<br>';
echo $a->time;
echo '<br>';
echo $a->age;
echo '<br>';
echo $a->getage();
echo '<br>';
echo $a->getconstellation();
echo '<br>';
echo $a->getzodiac();
//没事干替你写了个全部的功能函数 写代码类 记得给好评
PHP输入年份查询属相的代码。PHP通过年份查询属相示例代码如下,具体逻辑体现在代码中。
<?php
//判断是否为日期格式,默认时间格式为Y-m-d
function is_date($dateStr,$fmt="Y-m-d"){
$dateArr = explode("-",$dateStr);
if(empty($dateArr)){
return false;
}
foreach($dateArr as $val){
if(strlen($val)<2){
$val="0".$val;
}
$newArr[]=$val;
}
$dateStr =implode("-",$newArr);
$unixTime=strtotime($dateStr);
$checkDate= date($fmt,$unixTime);
if($checkDate==$dateStr)
return true;
else
return false;
}
//通过出生年月获取属相
function getShuXiang($bithdayDate){
//判断输入日期格式
if(!is_date($bithdayDate)){
echo "日期输入错误,请检查!";
}
//1900年是鼠年
$data = array('鼠','牛','虎','兔','龙','蛇','马','羊','猴','鸡','狗','猪');
$index = ($bithdayDate-1900)%12;
return $data[$index];
}
echo "属相:".getShuXiang("1989-05-19");
//属相:蛇
?>
关于PHP是什么生肖的介绍到此就结束了,不知道本篇文章是否对您有帮助呢?如果你还想了解更多此类信息,记得收藏关注本站,我们会不定期更新哦。
查看更多关于PHP是什么生肖 php什么意思的详细内容...