【麻豆苹果cms影视源码】【怎么隐藏网页源码】【雕刻机源码】生肖php源码_12生肖平台源码

2025-02-08 10:19:59 来源:圆满支付平台源码 分类:综合

1.php 自动计算12生肖

生肖php源码_12生肖平台源码

php 自动计算12生肖

       <?生肖麻豆苹果cms影视源码php

        ////-->出生年月

        /

*

        计算个星座

        计算个生肖

        计算年龄

        */

        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////;

        return (int)$this->age;

        }

        public function getconstellation()

        {

        switch ($this->m)

        {

        case 1:

        if ($this->d < )

        {

        $this->constellation = '摩羯座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '水瓶座';

        return $this->constellation;

        }

        break;

        case 2:

        if ($this->d < )

        {

        $this->constellation = '水瓶座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '双鱼座';

        return $this->constellation;

        }

        break;

        case 3:

        if ($this->d < )

        {

        $this->constellation = '双鱼座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '白羊座';

        return $this->constellation;

        }

        break;

        case 4:

        if ($this->d < )

        {

        $this->constellation = '白羊座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '金牛座';

        return $this->constellation;

        }

        break;

        case 5:

        if ($this->d < )

        {

        $this->constellation = '金牛座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '双子座';

        return $this->constellation;

        }

        break;

        case 6:

        if ($this->d < )

        {

        $this->constellation = '双子座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '巨蟹座';

        return $this->constellation;

        }

        break;

        case 7:

        if ($this->d < )

        {

        $this->constellation = '巨蟹座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '狮子座';

        return $this->constellation;

        }

        break;

        case 8:

        if ($this->d < )

        {

        $this->constellation = '狮子座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '处女座';

        return $this->constellation;

        }

        break;

        case 9:

        if ($this->d < )

        {

        $this->constellation = '处女座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '天秤座';

        return $this->constellation;

        }

        break;

        case :

        if ($this->d < )

        {

        $this->constellation = '天秤座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '天蝎座';

        return $this->constellation;

        }

        break;

        case :

        if ($this->d < )

        {

        $this->constellation = '天蝎座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '射手座';

        return $this->constellation;

        }

        break;

        case :

        if ($this->d < )

        {

        $this->constellation = '射手座';

        return $this->constellation;

        }

        else

        {

        $this->constellation = '摩羯座';

        return $this->constellation;

        }

        break;

        }

        }

        public function getzodiac()

        {

        $this->animals = array('é¼ ', '牛', '虎', '兔', '龙', '蛇','马', '羊', '猴', '鸡', '狗', '猪');

        $this->zodiac = ($this->y - ) % ;

        return $this->animals[$this->zodiac];

        }

       }

       $age = strtotime('--');

       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();

       //没事干替你写了个全部的功能函数 写代码类 记得给好评

更多资讯请点击:综合

热门资讯

云商城源码_云商城源码免费

2025-02-08 09:501985人浏览

源码电视剧

2025-02-08 08:151240人浏览

流行源码_流行源码论坛

2025-02-08 08:08728人浏览

招商网源码_招商网站源码

2025-02-08 07:351437人浏览

推荐资讯

上门服务办证 让监管有温度

中国消费者报西安讯张强 记者徐文智)近期,西安地区遇持续高温。西安市市场监管局港务浐灞分局组织监管人员不惧骄阳、不畏热浪,多次深入纺渭路农贸市场上门服务,为需要换证的经营户集中办理《食用农产品重点品种

strcpy源码

1.请用上 strcat的源码 编一个最简单的c程序!急!!!!!!请用上 strcat的源码 编一个最简单的c程序!急!!!!!! #include <stdio.h> #in